Hi,
I am trying to create a collection that has 4 Comboboxes that are all multiselect and based upon the selections it will filter the collection. The coding I have that is somewhat working except it is creating duplicates is as follows.
//ColumnA
If(CountRows(comboboxA.SelectedItems)>0,ForAll(comboboxA.SelectedItems.Value As myData,Collect(colfilteredcontent,Filter(colToBefiltered,myData.Value in columnA.Value))));ClearCollect(colToBefiltered,colfilteredcontent);Clear(colfilteredcontent);
//ColumnB
If(CountRows(comboboxB.SelectedItems)>0,ForAll(comboboxB.SelectedItems.Value As myData,Collect(colfilteredcontent,Filter(colToBefiltered,myData.Value in ColumnB.Value))));ClearCollect(colToBefiltered,colfilteredcontent);Clear(colfilteredcontent);
//ColumnC
If(CountRows(comboboxC.SelectedItems)>0,ForAll(cbPlatformC.SelectedItems.Value As myData,Collect(colfilteredcontent,Filter(colToBefiltered,myData.Value in ColumnC.Value))));ClearCollect(colToBefiltered,colfilteredcontent);Clear(colfilteredcontent);
//ColumnD
If(CountRows(comboboxD.SelectedItems)>0,ForAll(comboboxD.SelectedItems.Value As myData,Collect(colfilteredcontent,Filter(colToBefiltered,myData.Value in ColumnD.Value))));ClearCollect(colToBefiltered,colfilteredcontent);Clear(colfilteredcontent);
The "colfilteredcontent" is the result of the filter which is then saved to the "colToBeFiltered" for the final display. The info is filtering properly but it is also repeated the info in the final collection I want to display. I've tried both the "Distinct" and "GroupBy" functions but they case so many other issues that it won't work. Any help is much appreciated.
Thanks!
User | Count |
---|---|
160 | |
84 | |
68 | |
64 | |
61 |
User | Count |
---|---|
206 | |
146 | |
95 | |
83 | |
66 |