
Announcements
Hi all,
I hope you can help.
I have a SharePoint list called [@Quotes] - The column within this is called "Internal Reviewer" and each row has a name assigned to it under that column. Ideally tallying up from the last two days. I am not using a gallery in this instance.
I would like a label within the App to reflect for example:
Any pointers would be so appreciated! 🙂
A couple different ways to go about this. Based on the assumption that you want to display counts for several people (wasn't really sure if your label example was that you would have one label, and the examples were just examples, or that you would have several labels reflecting the count for several people), I will present this for you to consider.
Utilize the GroupBy function on your data:
AddColumns(
GroupBy(Quotes,
'Internal Reviewer',
"records"
),
"assignedCount", CountRows(records)
)
You could assign this to a collection or variable or a dynamic variable and then reference it from your label - for example, using a collection:
ClearCollect(colYourReviewerCounts,
AddColumns(
GroupBy(Quotes,
'Internal Reviewer',
"records"
),
"assignedCount", CountRows(records)
)
)
Then in your Label, the following for the Text property:
Coalesce(
LookUp(colYourReviewerCounts, 'Internal Reviewer' = "Tim Love", assignedCount),
0
)
Note: I use the Coalesce function in this in case there are no results - then the result will be 0.
Now, if this is more of a singular person thing, you can also use the CountIf function:
CountIf(Quotes, 'Internal Reviewer'= "Tim Love")
So, those are some options, just depends on how you are designing your app as to which is better to take. Consider that you only want to write a formula once and not copy/paste it as a guide.
I hope this is helpful for you.