cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
C_Baugher
Frequent Visitor

Multiple filters with show all for blank

Hey there!

 

Gallery: ticketlist_1

 

 

If(
    !IsBlank(statusvariable & approvalvariable & regionvariable),
    Filter(
        'My List',
        'Submitted by'.DisplayName = "REDACTED",
        (statusvariable = "" || Status.Value = statusvariable) && (approvalvariable = "" || Approval.Value = approvalvariable) //&& (regionvariable = "" || Region.Value = regionvariable)
    ),
    Filter(
        'My List',
        'Submitted by'.DisplayName = "REDACTED"
    )
)

 

 

Problem: When I uncomment the region part, the filter doesn't work as intended. Works fine with just the first two.

Intended: I want the filter to be ignored if the dropdown is set to blank (I think, right now the filter is LOOKING for blank instead of discarding).

 

Three dropdowns and their variables:

Region/TeamItems are pulled in from a customer list and the region is selected.regionvariable
StatusItems are listed manually.statusvariable
ApprovalItems are listened manually.approvalvariable
1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@C_Baugher 

Consider changing your formula to the following:

If(
    !IsBlank(statusvariable & approvalvariable & regionvariable),
    Filter(
        'My List',
        'Submitted by'.DisplayName = "REDACTED",
        (statusvariable = "" || Status.Value = statusvariable) && 
        (approvalvariable = "" || Approval.Value = approvalvariable) && 
        If(!IsBlank(regionvariable, Region.Value = regionvariable, true)
    ),
    Filter(
        'My List',
        'Submitted by'.DisplayName = "REDACTED"
    )
)

 

That should give you what you need.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

2 REPLIES 2
RandyHayes
Super User III
Super User III

@C_Baugher 

Consider changing your formula to the following:

If(
    !IsBlank(statusvariable & approvalvariable & regionvariable),
    Filter(
        'My List',
        'Submitted by'.DisplayName = "REDACTED",
        (statusvariable = "" || Status.Value = statusvariable) && 
        (approvalvariable = "" || Approval.Value = approvalvariable) && 
        If(!IsBlank(regionvariable, Region.Value = regionvariable, true)
    ),
    Filter(
        'My List',
        'Submitted by'.DisplayName = "REDACTED"
    )
)

 

That should give you what you need.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Gah, thank you so very much, I knew it was something simple, but I've been staring at it too long.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (2,056)