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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Collection Formula - M...
Power Apps
Answered

Collection Formula - Missing Counting Values

(0) ShareShare
ReportReport
Posted on by 35

Hi All - I am creating a collection and having an issue, whereas my code is adding the values up wrong.

In particular, I am building a collection of individuals by race. My collection accurately returns the following:

 

Alaska Native, Black, Caucasian, Hispanic, Native Hawaiian - all of which calculate correctly

 

However when calculating the "Asian" value with the "Caucasian" value. For whatever reason(s), it adds the "Caucasian" values correctly, but in the case of "Asians", it is adding the "Caucasian" value to it.

 

I can see where the string "asian" is true in both strings. Is there some function that would be more specific/deliberate in differentiating the two strings? Is there a function that I can add to my code to assist?

 

Thanks.

 

- - - SNIPET - - -

 

ClearCollect(
totAgentsByRaceCount,
AddColumns(
totalAgentsByRace,
AgentCount,
CountRows(
Filter(
'Agents',
totalAgentsByRace[@Race] in Text(Race)
)
)
)
);
Categories:
I have the same question (0)
  • Gochix Profile Picture
    1,935 Moderator on at

    @RichHarr ,

     

    try using

    totalAgentsByRace[@Race] = Text(Race)

     rather than totalAgentsByRace[@Race] in Text(Race)


    _____________________________________________________________________________________
    Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    HI @RichHarr,

    Do you want to count Race column from totalAgentsByRace in Race column from 'Agents'?

    If so, try to modify as below:

    ClearCollect(
    totAgentsByRaceCount,
    AddColumns(
    totalAgentsByRace,
    AgentCount,
    CountRows(
    Filter(
    'Agents',
    Text(Race) in totalAgentsByRace.Race
    )
    )
    )
    );

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 525 Most Valuable Professional

#2
Haque Profile Picture

Haque 273

#3
Kalathiya Profile Picture

Kalathiya 232 Super User 2026 Season 1

Last 30 days Overall leaderboard