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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Svendu
Frequent Visitor

Enabling to filter in time current and past status

Spoiler

Dear Community, 

 

I would like to be able to show data based on their current or previous status depending on how you filter them in time.

To make it more concrete, the data below represent recruiting positions that are open and, at a certain "closed date" are moving to the status "filled".

I would like to be able to make a position appear as "open" if filtering to a date prior to its "closed date" even if it now "Filled" 


Thank you very much in advance!!

 

 

 

Power BI Coomunity.png

Example at the bottom on the list, "Closed date" is Oct 13th 2022, how can I show it as „Open“ if filtering for instance September 2022?

 

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @Svendu ,

 

I think "Date Filter" table should be an unrelated date table with your data table.

Dynamic Status =
VAR _MAXDATE =
    MAX ( 'Date Filter'[Date] )
RETURN
    IF (
        MAX ( 'Table'[Date Created] ) <= _MAXDATE,
        IF (
            MAX ( 'Table'[Closed Date] ) = BLANK ()
                || MAX ( 'Table'[Closed Date] ) >= _MAXDATE,
            "Open",
            "Filled"
        ),
        "Filled"
    )

Result is as below.

1.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-rzhou-msft
Community Support
Community Support

Hi @Svendu ,

 

I think "Date Filter" table should be an unrelated date table with your data table.

Dynamic Status =
VAR _MAXDATE =
    MAX ( 'Date Filter'[Date] )
RETURN
    IF (
        MAX ( 'Table'[Date Created] ) <= _MAXDATE,
        IF (
            MAX ( 'Table'[Closed Date] ) = BLANK ()
                || MAX ( 'Table'[Closed Date] ) >= _MAXDATE,
            "Open",
            "Filled"
        ),
        "Filled"
    )

Result is as below.

1.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi @v-rzhou-msft ,

 

Thank you very much for your prompt and detailed solution on this. 

Somehow I can't replicate it. I do have a date table in place but it all shows open for me. 

I see though an issue in the suggested approcah. If you look at the example you sent, everything that is blank and after the seleted filtered date shows "filled" even if I would expect it to be "open" with your formula. Any clue on this?

Thank you very much.

SvenDu

 

 

daXtreme
Solution Sage
Solution Sage

Not getting any replies since Friday? Have a look: How to Get Your Question Answered Quickly (powerbi.com)

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.