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 / Filtering Choice Field...
Power Apps
Answered

Filtering Choice Field Values Based on currentValue in Power Apps

(3) ShareShare
ReportReport
Posted on by 169

Hello everyone,

I'm currently working on a Power Apps project, and I have a question regarding the filtering of Choice field values based on a condition. I have a Choice field where I want to display only the options who's corresponding currentValue is greater than or equal to 0.

I have implemented a formula, but it doesn't work as expected. The formula stops at the first logical test and doesn't proceed further. Here's the formula I'm using:

Bambula_0-1684847123721.png

 

If(
 currentLD = 0,
 Filter(
 Choices([@employee_requests_list].requestType),
 Value = "Non-standard equipment" || Value = "Psychological support" || Value = "Gift for child"
 ),
 currentEQ = 0,
 Filter(
 Choices([@employee_requests_list].requestType),
 Value = "Learning & development" || Value = "Psychological support" || Value = "Gift for child"
 ),
 currentPS = 0,
 Filter(
 Choices([@employee_requests_list].requestType),
 Value = "Learning & development" || Value = "Non-standard equipment" || Value = "Gift for child"
 ),
 currentCG = 0,
 Filter(
 Choices([@employee_requests_list].requestType),
 Value = "Learning & development" || Value = "Non-standard equipment" || Value = "Psychological support"
 ),
 Choices([@employee_requests_list].requestType)
)

 

Bambula_1-1684847149971.png

I would like to know if there is a better solution to display only the choices that have a currentValue greater than or equal to 0. Additionally, at the start of the application, I have created variables currentLD, currentEQ, currentCG, and currentPS using the following formula:

 

Set(currentLD, LookUp(employee_budgets, Title = User().Email, LD));
Set(currentEQ, LookUp(employee_budgets, Title = User().Email, EQ));
Set(currentCG, LookUp(employee_budgets, Title = User().Email, CG));
Set(currentPS, LookUp(employee_budgets, Title = User().Email, PS));

 

These variables are used to check if the currentValue is greater than or equal to 0.

If anyone has a more efficient solution or suggestions on how to improve my existing formula, I would greatly appreciate your input.

Thank you in advance for your help!

Best regards,

Categories:
I have the same question (0)
  • Verified answer
    Bambula Profile Picture
    169 on at

    Hi @v-jefferni 

    Thank you for your kind response. However, in the meantime, I have found a solution, and it is working well.

     

     

    Filter(
     Choices([@employee_requests_list].requestType),
     (currentLD > 0 && Value = "Learning & development") ||
     (currentEQ > 0 && Value = "Non-standard equipment") ||
     (currentCG > 0 && Value = "Gift for child") ||
     (currentPS > 0 && Value = "Psychological support")
    )

     




     
  • v-jefferni Profile Picture
    on at

    Hi @Bambula ,

     

    Do you have four choices in a Choice column, and would like to set three from the four as selections in the Combo box based on which variable is 0? Is it possible that there are more than 1 variables are not 0? I think the more propriate method is removing a value if corresponding variable is not 0. Please try below formula instead:

     

    With(
     {
     wChoices:Choices([@employee_requests_list].requestType
     },
     With(
     {wLD: 
     If(
     currentLD != 0,
     Filter(
     wChoices,
     Value != "Learning & development"
     ),
     wChoices
     },
     With(
     {wEQ:
     If(
     currentEQ != 0,
     Filter(
     wLD,
     Value != "Non-standard equipment"
     ),
     wLD)
     },
     With(
     {wPS: 
     If(
     currentPS != 0,
     Filter(
     wEQ,
     Value != "Psychological support"
     ),
     wEQ)
     },
     If(
     currentCG != 0,
     Filter(
     wEQ,
     Value != "Gift for child"
     ),
     wEQ
     )
     )
     )
     )
    )

     

     

    Best regards,

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
Kalathiya Profile Picture

Kalathiya 427

#2
WarrenBelz Profile Picture

WarrenBelz 360 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 336 Super User 2025 Season 2

Last 30 days Overall leaderboard