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 / Help with an If statement
Power Apps
Answered

Help with an If statement

(0) ShareShare
ReportReport
Posted on by 200

Hello,  i am building an app wher ei have 4 radio buttons that are used to filter the results.  my If statement works for some of the scenarios but not all of them, and i'm trying to figure out why.   Each record has 2 boolean fields, Process Confirmed, and Resolved.

 

my 4 states are;

All Records - No filter applied

Unresolved - Resolved <> true

Resolved but not Completed - Resolved = true, & Process Completed <> true

Completed - Resolved = true & Process Completed = true

 

 

Here is my statement;

If(Radio1.SelectedText.Value = "Unresolved",Filter('Defect Tracking',Resolved <> true),
If(Radio1.SelectedText.Value = "Resolved but not Completed",Filter('Defect Tracking',And(Resolved = true, 'Process Confirmed' <> true)),
If(Radio1.SelectedText.Value = "Completed",Filter('Defect Tracking',And('Process Confirmed' = true,Resolved = true)),
'Defect Tracking')))

 

Frac_0-1682017155879.png

 

The completed selection is not working for me.  based on my data,  only record 1 should show up since both items are true, however,  only record 3 shows up.  I'm a little confused as to why this is happending,  since none of the other unresolved records are showing up.

Frac_1-1682018275391.png

Any idea how i fix this so this ste will show records where Resolved and Process Confirmed are both true?

Categories:
  • Verified answer
    BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    Hi @Frac ,

     

    I recommend to use an Switch function instead of nested If functions for your case because it's easier to keep track of the conditions. Your issues are caused by incorrect nesting of some of the functions.

     

    The below should do the trick:

    Switch(
    	Radio1.Selected.Value,
    	"All Records", 'Defect Tracking',
    	"UnResolved", Filter('Defect Tracking', Resolved <> true),
    	"Resolved but not Completed", Filter('Defect Tracking', Resolved = true && 'Process Confirmed' <> true),
    	"Completed", Filter('Defect Tracking', Resolved = true && 'Process Confirmed' = true)
    )

     

    Notice I replaced Radio1.SelectedText with Radio1.Selected because SelectedText is a deprecated property.

  • Frac Profile Picture
    200 on at

    @BCBuizer Thanks for cleaning up that formula for me.  one followup question;  

    "UnResolved", Filter('Defect Tracking', Resolved <> true),

     

    this was working in my if statement, but now is returning nothing.  is there somehting else that i need to fix here?

     

    Frac_0-1682029941141.png

     

  • Frac Profile Picture
    200 on at

    @BCBuizer Never mind,  i fixed it, UnResolved had to change to Unresolved.   thanks so much

  • charlessexton Profile Picture
    11 Super User 2024 Season 1 on at

    Is it because of the capital R in unresolved?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard