
Announcements
Hello,
I am trying to filter values in a Sharepoint list, with the goal being to assemble a filtered table where entries with duplicate Titles are removed.
So for example, if below is my data source:
| ID | Title | Desc | Ref # |
| 1 | A | Issue A v1 | 97957 |
| 2 | B | Issue B v1 | 13645 |
| 3 | C | Issue C v1 | 16283 |
| 4 | A | Issue A v2 | 46923 |
| 5 | C | Issue C v2 | 82005 |
| 6 | D | Issue D v1 | 86785 |
| 7 | A | Issue A v3 | 91454 |
| 8 | A | Issue A v3 | 91279 |
| 9 | D | Issue D v2 | 15295 |
| 10 | E | Issue E v1 | 40639 |
I would need for it to output the following:
| ID | Title | Desc | Ref # |
| 2 | B | Issue B v1 | 13645 |
| 5 | C | Issue C v2 | 82005 |
| 8 | A | Issue A v3 | 91279 |
| 9 | D | Issue D v2 | 15295 |
| 10 | E | Issue E v1 | 40639 |
I would prefer not to hard code column names, if possible.
Thanks.
Hi @SeanWCain,
Could you please tell me that the condition you want to filter the table based on?
I could not get the key to why you want to filter like above?
Do you want to keep the last one if there is a duplicate Title?
If so, please try as follows.
Add a button and set the OnSelect as below:
ClearCollect(
AssCol,
Sort(
DropColumns(
AddColumns(
GroupBy(
Assemble,
"Title",
"NewTitle"
),
"NewID",
Last(NewTitle.ID).ID,
"NewDesc",
Last(NewTitle.Desc).Desc,
"NewRef",
Last(NewTitle.'Ref #').'Ref #'
),
"NewTitle"
),
NewID,
Ascending
)
)
Notice that 'Assemble' is my SP list name, please replace it with yours.
Hope it could help you.
Regards,
Qi