cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kashy
Level: Powered On

ignore filter if radio buttion value is none

I have radio buttons on a different screen and I'm trying to filter the data as per the selection.

 

Filter(Purchases, CategoryTxt=thisCat,If(warr="Out of Warranty",DateValue(Expiry_Date)<Today(),If(warr="Under Warranty",DateValue(Expiry_Date)>Today(),false)))

 

But, the issue I'm facing is, when radio button value is none, I need all items to be shown.

 

How can I achive this?

1 REPLY 1
Super User
Super User

Re: ignore filter if radio buttion value is none

Have tried using the switch statement. It could execute different Filters based on the value of the radio buttons. It would look something like this:

 

 

Switch(warr, 
  "Out of Warranty", 
  Filter(Purchases, 
    CategoryTxt=thisCat, DateValue(Expiry_Date)<Today()
  ),
  "Under Warranty",
  Filter(Purchases,
    CategoryTxt=thisCat, DateValue(Expiry_Date)>Today()
  ),
  Filter(Purchases,
    CategoryTxt=thisCat)
)

I did this freehand, so there could be some typos.

 



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,092)