deod Posted September 26 Posted September 26 A very simple approach to do something like select distinct in SQL to return number of distinct entries. For ex. in the following table i want to find how many kitchens are currently being used for Marinara. I was able to extend the pandas example for the new python feature to search through the table and return number of kitchens being used for Marinara. 'PandasSelectDistinct' step lets users define the columns to filter and conditions for filtering. Users also need to define 'GroupList' , column to group by and 'DistinctList' column to count distinct entries. For ex. in this scenario table is filtered on Processed==false and KitchenAssigned == true. Group by ItemName and distinct by Kitchen. Entity triggering the process is 'Marinara' step will return 2. This method can be extended to return actual kitchens being used as well. To define filter conditions use 'Column Name1' == 'Value', 'Column Name2'=='Value'.....etc. I am using model/script from Pands Date Frame from Table on git hub.SelectDistinctFromTable.spfx I have not tested the model extensively. Just a starting point for something I wanted to do for a long time.
Recommended Posts