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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
SonaSinghA
Helper III
Helper III

DAX help for max date of each week

Hi Experts,
Need to calculate max date for each week. The below formula is working fine except for the week of January.
Please help

 

Reporting Period = CONCATENATE(YEAR(Calendar[Date]) & " W-", Calendar[Iso Week])
Max Date =
VAR GroupBy = Calendar[Reporting Period]
RETURN
MAXX(
FILTER ALL(Calendar), Calendar[Reporting Period]=GroupBy),
Calendar[Date])
1 ACCEPTED SOLUTION
PijushRoy
Super User
Super User

Hi @SonaSinghA 

Please find the DAX for Measure

 

MaxDateOfWeek = 
VAR WeekSummary =
    SUMMARIZE(
        'Date',
        'Date'[WeekNumber],  
        "MaxDate", MAX('Date'[Date]) 
    )
RETURN
    MAXX(WeekSummary, [MaxDate])

 

PBIX

https://drive.google.com/file/d/1m3Ufne7cm3eIWlMO56XJd51NA3QMjxtx/view?usp=sharing

 

PijushRoy_0-1709202001984.png

 


Let me know if that works for you


If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.

Thanks
Pijush
Linkedin

View solution in original post

1 REPLY 1
PijushRoy
Super User
Super User

Hi @SonaSinghA 

Please find the DAX for Measure

 

MaxDateOfWeek = 
VAR WeekSummary =
    SUMMARIZE(
        'Date',
        'Date'[WeekNumber],  
        "MaxDate", MAX('Date'[Date]) 
    )
RETURN
    MAXX(WeekSummary, [MaxDate])

 

PBIX

https://drive.google.com/file/d/1m3Ufne7cm3eIWlMO56XJd51NA3QMjxtx/view?usp=sharing

 

PijushRoy_0-1709202001984.png

 


Let me know if that works for you


If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.

Thanks
Pijush
Linkedin

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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