Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Create a filter based on a measure

I have a dataset with a lot of tickets.

A tickets has an id, an open date, a start date and a close date.

 

The end user has to possibility to select a single date and this will change the status of the tickets.

 

For example:

 

ID, Open Date, Start Date, Close Date

1, 01/01/2019, 10/02/2019, 12/03/2019

2, 01/02/2019, 10/01/2019, 12/01/2019

 

If the date selected is between Open Date and Start Date a ticket is open, if is between Start Date and Close Date the ticket is started, if is after Close Date the ticket is Closed.

 

I'd like to have a filter that on the context of the data selected, will give only the open, or the started, or the closed tickets.

 

I can't do it with a measure because I can't set a measure as a filter and I can't do it with a calculated column because is not dynamic.

 

I tried to implement the solution posted here https://community.powerbi.com/t5/DAX-Commands-and-Tips/Create-a-filter-based-on-a-measure/m-p/830277 , but the filter will apply only to the table with the value of the status and not on the other visuals (for example card, other measures without the status ecc.)

 

Any suggestion if it is possible to have a filter on the status the will filter also all the other data like a normal filter?

1 REPLY 1
Anonymous
Not applicable

Create one dummy date table.

WHich is

Calendar=Calenderauto(01/01/2016,12/31/2020)

 

Create new measure

Filter = IF(MIN(Table2[ Open Date])<=MIN('Calendar'[Date]) && MIN(Table2[ Start Date])>=MIN('Calendar'[Date]),"Open",
IF(MIN(Table2[ Start Date])<=MIN('Calendar'[Date]) && MIN(Table2[ Close Date])>=MIN('Calendar'[Date]),"Started",
IF(MIN(Table2[ Close Date])<=MIN('Calendar'[Date]),"Closed")))
 
And add it in visual level filter.
from there you can set it to any value that is "Open","Started","Closed".
Capture1.PNG
 
 
 
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar

If I resolve your problem Mark it as a solution and give kudos.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.