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
ammarzainal_94
New Member

Display the last 12 weeks date from a selected date

Hi everyone , I am trying to display the last 12 weeks date from a selected date . 
However, there are no data on the last 12 weeks date , But i just want to display the date so that viewer can take note on the last 12 weeks date . 

I am using "The Last 12 Weeks Date = CALCULATE(DATEADD(LASTDATE('Date'[Notification Date]),-77,DAY))" , but at some point , the "card" visual is showing blank because I have no notification on the last 12 weeks date from a selected date . 

Should I add another independent table to help display available date ?

Picture showing blank because there's no data on that last 12 weeks date from a selected date from the notification date filter.

ammarzainal_94_0-1692168200409.png

Picture showing 5/23/2023 because there's a data on that last 12 weeks date from a selected date from the notification date filter.

ammarzainal_94_1-1692168213585.png

 





 

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Why not just show in your measure what is the latest available date instead?

MESURE_ =
VAR LatestNotificationDate =
    "Latest avaiable from past 12 weeks: "
        & FORMAT (
            CALCULATE (
                MAX ( Notification[Date] ),
                FILTER ( Dates, Dates[Date] <= MAX ( Dates[Date] ) - ( 7 * 12 ) )
            ),
            "dd/mm/yyyy"
        )
RETURN
    IF ( ISBLANK ( [My Measure] ), LatestNotificationDate, [My Measure] )




Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

3 REPLIES 3
danextian
Super User
Super User

Why not just show in your measure what is the latest available date instead?

MESURE_ =
VAR LatestNotificationDate =
    "Latest avaiable from past 12 weeks: "
        & FORMAT (
            CALCULATE (
                MAX ( Notification[Date] ),
                FILTER ( Dates, Dates[Date] <= MAX ( Dates[Date] ) - ( 7 * 12 ) )
            ),
            "dd/mm/yyyy"
        )
RETURN
    IF ( ISBLANK ( [My Measure] ), LatestNotificationDate, [My Measure] )




Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Ritaf1983
Super User
Super User

Hi @ammarzainal_94 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

thanks so much @Ritaf1983  , I have the solution from @danextian working for me already . Love the community ! all of them are really kind to help . 

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.