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

Why are these Max measures returning different results?

Hi All,

 

I am trying to get the end date for the most current month the report has date for.  These two measures are identical other than the .Date.  How does that change the result?  What is also odd to me is the last date in that col is 3/30/19, so how is it getting to 12/31/19.  Probably the same answer.  Thanks.

 

Updated date = EOMONTH(max('SITE PERFORMANCE'[Last Screen date]),0)
Last day = EOMONTH(max('SITE PERFORMANCE'[Last Screen date].[Date]),0)
 

Screenshot_1.png

3 REPLIES 3
TeigeGao
Solution Sage
Solution Sage

Hi @Anonymous ,

Based on my test, if we haven't transferred a filter to the function .date, .month or .day, it will return the full value. For example, if I use MIN(Table[Column].[Day]), it will return 1, if I use MAX(Table[Column].[Day]), it will return 31. In your scenario, when we use max('SITE PERFORMANCE'[Last Screen date]), it will return the last day of 2019, 12/31/2019, if I use min('SITE PERFORMANCE'[Last Screen date]), it will return 1/1/2019

Best Regards,

Teige

HotChilli
Super User
Super User

I haven't looked into the details but this will be related to the hidden date tables in PowerBi.  Once the .xxxx notation is used, the data is fetched from these tables.  

 

Update: MAX is going to give some interesting results with .MONTH !

tex628
Community Champion
Community Champion

When you do a MAX('Calendar'[Date].[Month]) it returns string values, so it returns the months in alphabetical order!

It's super weird 🙂 


Connect on 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.