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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Filter using different criteria

Hi, I'm trying to filter my table using 3 different options.
Simply put, depending on what option a user chooses, i want to do one of three possible filters.

Here's my tables and joined field

StevenT_0-1655211520013.png

 

Here are the 3 sepater filters I’m trying to create

If Epic Actual End Date is between Start Date and End Date, include in filter, else hide it
If Epic Actual End Date is between Prev3IterDate and End Date, include in filter, else hide it
If Epic Actual End Date is between Start Date and Next3IterDate, include in filter, else hide it

How do I create this type of filter? I'm having trouble creating any of these.

Thank you.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

You can create three measures to solve this problem with the bookmark navigator.

Measures.

Filter 1 = 
VAR _iteration =
    MAX ( 'DataTable'[Iteration] )
VAR _date =
    MAX ( 'DataTable'[Epic Actual End Date] )
VAR _start =
    CALCULATE (
        MAX ( 'Table'[Start Date] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Iteration] = _iteration )
    )
VAR _end =
    CALCULATE (
        MAX ( 'Table'[End Date] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Iteration] = _iteration )
    )
VAR _result =
    IF ( _date >= _start && _date <= _end, 1 )
RETURN
   _result
Filter 2 = 
VAR _iteration =
    MAX ( 'DataTable'[Iteration] )
VAR _date =
    MAX ( 'DataTable'[Epic Actual End Date] )
VAR _start =
    CALCULATE (
        MAX ( 'Table'[Prev3IterDate] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Iteration] = _iteration )
    )
VAR _end =
    CALCULATE (
        MAX ( 'Table'[End Date] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Iteration] = _iteration )
    )
VAR _result =
    IF ( _date >= _start && _date <= _end, 1 )
RETURN
   _result
Filter 3 = 
VAR _iteration =
    MAX ( 'DataTable'[Iteration] )
VAR _date =
    MAX ( 'DataTable'[Epic Actual End Date] )
VAR _start =
    CALCULATE (
        MAX ( 'Table'[Start Date] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Iteration] = _iteration )
    )
VAR _end =
    CALCULATE (
        MAX ( 'Table'[Next3IterDate] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Iteration] = _iteration )
    )
VAR _result =
    IF ( _date >= _start && _date <= _end, 1 )
RETURN
   _result

vcgaomsft_0-1655446405932.png

vcgaomsft_1-1655446441232.png

vcgaomsft_2-1655446475742.png

Attached PBIX file for reference.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

 

You can create three measures to solve this problem with the bookmark navigator.

Measures.

Filter 1 = 
VAR _iteration =
    MAX ( 'DataTable'[Iteration] )
VAR _date =
    MAX ( 'DataTable'[Epic Actual End Date] )
VAR _start =
    CALCULATE (
        MAX ( 'Table'[Start Date] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Iteration] = _iteration )
    )
VAR _end =
    CALCULATE (
        MAX ( 'Table'[End Date] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Iteration] = _iteration )
    )
VAR _result =
    IF ( _date >= _start && _date <= _end, 1 )
RETURN
   _result
Filter 2 = 
VAR _iteration =
    MAX ( 'DataTable'[Iteration] )
VAR _date =
    MAX ( 'DataTable'[Epic Actual End Date] )
VAR _start =
    CALCULATE (
        MAX ( 'Table'[Prev3IterDate] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Iteration] = _iteration )
    )
VAR _end =
    CALCULATE (
        MAX ( 'Table'[End Date] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Iteration] = _iteration )
    )
VAR _result =
    IF ( _date >= _start && _date <= _end, 1 )
RETURN
   _result
Filter 3 = 
VAR _iteration =
    MAX ( 'DataTable'[Iteration] )
VAR _date =
    MAX ( 'DataTable'[Epic Actual End Date] )
VAR _start =
    CALCULATE (
        MAX ( 'Table'[Start Date] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Iteration] = _iteration )
    )
VAR _end =
    CALCULATE (
        MAX ( 'Table'[Next3IterDate] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Iteration] = _iteration )
    )
VAR _result =
    IF ( _date >= _start && _date <= _end, 1 )
RETURN
   _result

vcgaomsft_0-1655446405932.png

vcgaomsft_1-1655446441232.png

vcgaomsft_2-1655446475742.png

Attached PBIX file for reference.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.