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
Anonymous
Not applicable

Max of a value

Hi All, 

 

Im trying to calculate the maximum date for the latest year data that I have. i.e for year 2020 Im trying to calculate the maximum month with the below dax query.

mm2.PNG

However, im getting the data in the below format where as I only require the maximum value i.e "5".

mm1.PNG

Later, when im trying to use this column as a in another column, im getting a circular dependency error. How can I resolve this?

mm3.PNG

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , You need to try like

 

calculate(Max(Table[Month]), Filter(allselected(Table), Table[Year] = max(Table[Year]) ) )

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , You need to try like

 

calculate(Max(Table[Month]), Filter(allselected(Table), Table[Year] = max(Table[Year]) ) )

Anonymous
Not applicable

Thank you it worked 🙂

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.