Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Filter 'has at least one true'

(0) ShareShare
ReportReport
Posted on by 15

I have a collecion with 3 columns like this:

 

QIDcorrectuserSelection
1falsefalse
1falsefalse
1falsefalse
1truefalse
2falsefalse
2truefalse
2falsefalse
2falsefalse




How can I check if there is a true value for each different QID in userSelection?

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on at
    Re: Filter 'has at least one true'

    Hi @SL93,

    Do you want to check if the userSelection matches to the answer?

    Could you please share a bit more about your need?

     

    From your description, I think you want to count if there is at least one true in a grouped QID.

    I have a test on my side, please take a try as below.

    Add a Gallery and set the Items property as below:

    GroupBy(collection,"QID","Answer")

    Set the Labels within it Text property as below:

    CountRows(Filter(ThisItem.Answer,correct="true"))

    vqiaqimsft_0-1635150309858.png

     

  • Ram Prakash Profile Picture
    5,154 Super User 2025 Season 1 on at
    Re: Filter 'has at least one true'

    Hello @SL93 ,

     

    Do you want to have group by with filter ?

  • CU26100700-0 Profile Picture
    15 on at
    Re: Filter 'has at least one true'

    What I am looking for is more like this:

    Filter(GroupBy(collection, "QID", "answers").answers, userSelection)

    But that is returning: "This identifier isn't recognized" on userSelection.

  • Ram Prakash Profile Picture
    5,154 Super User 2025 Season 1 on at
    Re: Filter 'has at least one true'

    Hello @SL93 

     

     

    Filter(TableName/CollectionName, userSelection = true && !Blank(Qid))

    That's it 🙂

     

     

    Please mark as Answer if it is helpful and provide Kudos

     

     

    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA

    Blog : https://microsoftcrmtechie.blogspot.com

  • CU26100700-0 Profile Picture
    15 on at
    Re: Filter 'has at least one true'

    Hi @rampprakash,

     

    thanks for the reply, but that won't fix my issue.

    I need all entries of the collection that have a QID where at least one has true at userSelection.

  • Ram Prakash Profile Picture
    5,154 Super User 2025 Season 1 on at
    Re: Filter 'has at least one true'

    Hello @SL93,

     

    You can simply use

     

    Filter(TableName/CollectionName, userSelection = true)

     

    Please mark as Answer if it is helpful and provide Kudos


    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
    Blog : https://microsoftcrmtechie.blogspot.com

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

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,651 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard