web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Display the count for ...
Power Apps
Unanswered

Display the count for each Distinct value in a Collection (HTML Text in PowerApps)

(0) ShareShare
ReportReport
Posted on by 14

Hi! How can I display the count for each Distinct value in a Collection? I need it to be formatted in HTML Text in PowerApps. Here are pictures of my codes:

kess_0-1680750125358.png

 

kess_1-1680750173158.png

 

I need the table on the lower part to look like this.

DenominationCount
USD 1003
USD 501
USD 11

 

Thanks a lot 😀

Categories:
I have the same question (0)
  • Verified answer
    cwebb365 Profile Picture
    3,294 Most Valuable Professional on at

    Not going to get into formatting since you can probably figure that part out. You would use something like this and put it in a collection wherever you build billCollection you can add this to it, then you can reference that collection in your html.

     

     

    ClearCollect(colbillCount,ShowColumns(
     AddColumns(
     GroupBy(billcollection, "NumeralDenomination", "ByDenomination"),
     "DenominationCount",
     CountRows(ByDenomination)
     ),
     "NumeralDenomination",
     "DenominationCount"
     ))

     

     

     

    "<html table and header etc.> <tbody> " &  ForAll(colBillCount, colBillCount.NumberalDenomination & "<tr><td>" &  colBillCount.DenominationCount & "<tr><td>" )

     

    Hopefully this helps. 

     

  • kess Profile Picture
    14 on at

    Thank you so much for your help! I've been trying to figure this out for about a day already. Thanks a lot 😃

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard