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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Dynamic date filter based in other filter

Hello,

I have a table with project name and update column (date type). It is supposed that all records have similar week update, however, there are some records with an older week update.

I have a page with two filters which shows the report for each project. So first filter is project name and second filter is week.

I want a dynamic filter for week: when I select the project name, I want that the week filter automatically shows (by default) the last week update for this project.

 

Project NameUpdateWeek
Project A05-06-202024
Project A12-06-202025
Project A19-06-202026
Project B05-06-202024
Project B15-06-202025
Project B19-06-202026
Project C12-06-202025
Project C19-06-202026
Project D05-06-202024
Project D12-06-202025

 

In this example, when I select Project A, week filter should be by defaut week 26 (and optional weeks 24 ans 25). And if I select Project D, week filter should be by defauld week 25 (and optional week 24).

 

Thanks!

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

Hi @Anonymous,

Maybe you can create a measure to extract the last week based on current project group and compare it with the current date to return tag, then you can see this on your filter to filter records.

Measure filter =
VAR currDate =
    MAX ( Table[Week] )
VAR _lastDate =
    CALCULATE (
        MAX ( Table[Week] ),
        ALLSELECTED ( Table ),
        VALUES ( Table[Project Name] )
    )
RETURN
    IF ( curDate = _lastDate, "Y", "N" )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

Maybe you can create a measure to extract the last week based on current project group and compare it with the current date to return tag, then you can see this on your filter to filter records.

Measure filter =
VAR currDate =
    MAX ( Table[Week] )
VAR _lastDate =
    CALCULATE (
        MAX ( Table[Week] ),
        ALLSELECTED ( Table ),
        VALUES ( Table[Project Name] )
    )
RETURN
    IF ( curDate = _lastDate, "Y", "N" )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User
Super User

@Anonymous , I doubt that is possible

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Do you know a way to clean the week filter each time when when I select a project in the project filter?
Therefore, it will force that the user select a week, preventing mistakes.

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! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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