Hello
I add a gallery with Items, names of Assigned People (it's a list with several names). In this gallery i add a label that calculate number of tickets per every people in this gallery. The formula of the label is based on a collection from another sharepoint list of tickets.
CountIf(col_AllTickets,ThisItem.Responsabil.DisplayName in Responsabil_Ticket'.DisplayName);
The Gallery display nice and correct the information but i want to sort the gallery based on largest number of tickets ,.
How can i achieve this sort by value of this label , without circular referencing error.
Solved! Go to Solution.
Hi @ciprianpopovici ,
AddColumns can do the trick for you here, Add the below into your gallery items property:
SortByColumns(
AddColumns(
GalleryDataSource As X,
"ticketsCount",
CountIf(col_AllTickets,X.Responsabil.DisplayName in Responsabil_Ticket'.DisplayName)
),
ticketsCount,
Descending
)
Hi @ciprianpopovici ,
AddColumns can do the trick for you here, Add the below into your gallery items property:
SortByColumns(
AddColumns(
GalleryDataSource As X,
"ticketsCount",
CountIf(col_AllTickets,X.Responsabil.DisplayName in Responsabil_Ticket'.DisplayName)
),
ticketsCount,
Descending
)
Thank you, it's working but can you try to explain what is doing As X function in this context. It will be better if understand...
Thanks again.
User | Count |
---|---|
250 | |
105 | |
82 | |
51 | |
43 |