Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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:
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on at
    Re: Collection Formula - Missing Counting Values

    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
    )
    )
    )
    );
  • Gochix Profile Picture
    1,933 Super User 2025 Season 1 on at
    Re: Collection Formula - Missing Counting Values

    @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!

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,026 Most Valuable Professional

Leaderboard