Hello community,
Currently i've got into a problem.
I have a collection named Artcollection with Description and Picture columns. After filtered the Description column, there are still a few duplicate results.
I want to only show Picture column as the first image item according the return results of a de-duplicate and filtered Description column.
I tried this on the gallery:
Distinct(Filter(Artcollection,'things to filter'=true),Description)
This on the image item property:
Thisitem.Picture
Do anyone know how to fix this? Great thanks!!!
Solved! Go to Solution.
Hi @Anonymous ,
Do you want to get de-duplicate Description column and display picture column with it?
Firstly, let me explain why you could not get picture:
Distinct(Filter(Artcollection,'things to filter'=true),Description)
This formula will return a table with column named Result with the value of de-duplicate Description.
There's no picture column anymore.
I suggest you use GroupBy function instead of Distinct function, which will still have the value of picture column.
Try this formula in your gallery's Items:
AddColumns(GroupBy(Filter(Artcollection,'things to filter'=true),"Description","samedes"),"pic",First(samedes).Picture)
Then the pic column will be the value of the first image that the description has.
set the image item property:
Thisitem.pic
Best regards,
Do you have true or false in the 'thin ge'
Column?
Also can you explain further
I want to only show Picture column as the first image item according the return results of a de-duplicate and filtered Description column.
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Yes I do have the true false value one the column 'things to filter',
I can explain more detail,
In the Artcollection collection there are couple columns like Description and Image and ReliefSociety.
Right now i want to filter Description column by lookup ReliefSociety boolean value.
After that I need to de-duplicate the Description column and display the image item in the gallery.
But it came out error
Hi @Anonymous ,
Do you want to get de-duplicate Description column and display picture column with it?
Firstly, let me explain why you could not get picture:
Distinct(Filter(Artcollection,'things to filter'=true),Description)
This formula will return a table with column named Result with the value of de-duplicate Description.
There's no picture column anymore.
I suggest you use GroupBy function instead of Distinct function, which will still have the value of picture column.
Try this formula in your gallery's Items:
AddColumns(GroupBy(Filter(Artcollection,'things to filter'=true),"Description","samedes"),"pic",First(samedes).Picture)
Then the pic column will be the value of the first image that the description has.
set the image item property:
Thisitem.pic
Best regards,
That works!! Thank you so much ! Sorry for the blurry explanation Haha
Thanks for the help, however since i input code
AddColumns(GroupBy(Filter(Artcollection,Office=true),"Title","Description"),"FirstPicture",First(Description).'Photo with Frame')
, I cannot use my original Collect() function. How can I lookup current Selecteditem's "Description" name in another collection and display the results on a new Gallery/Table ?
User | Count |
---|---|
253 | |
113 | |
92 | |
48 | |
38 |