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

Mixing MIN and ALL

Hello,

 

I'm working with a table containing a date column, and I want to get the oldest date in the table date column without being affected by the filters applied in the page.

 

If I create a measure "oldestdate = min(CCR_Consumption[usage_date])", syntax is OK but filters on the page will change the returned value.

 

If I use oldestdate = min(all(CCR_Consumption[usage_date])), I get an error message "The MIN function only accepts a column reference as an argument"

 

Thank you for your help.

 

Laurent

 

 

 

 

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

 

@Anonymous 

 

Hi, to obtain the MIN

 

MinDate=CALCULATE(MIN(Table1[yourDateColumn]), ALL(DateTable))

 

Regards

 

Victor




Lima - Peru

View solution in original post

3 REPLIES 3
PattemManohar
Community Champion
Community Champion

@Anonymous  You can try this as well...

 

MINX(ALL(CCR_Consumption),CCR_Consumption[usage_date])




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

Proud to be a PBI Community Champion




Vvelarde
Community Champion
Community Champion

 

@Anonymous 

 

Hi, to obtain the MIN

 

MinDate=CALCULATE(MIN(Table1[yourDateColumn]), ALL(DateTable))

 

Regards

 

Victor




Lima - Peru
Anonymous
Not applicable

Works like a charm. Thank you 🙂

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.