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

View all the Fabric Data Days sessions on demand. View schedule

Reply
AntonioLouisa
Regular Visitor

Dax Help - Extract Max Date from Table Visual

Hi All,

 

Is there a way to extract the max Date in the following Visual. 

i.e. I need the date 24/12/2018 (in a measure) based on the condition that value of $ Forecast Remaining being almost zero.

 

...But because [$ Forecast Remaining] is a Quick Measure Running Total, I dont seem to be able to create a Measure like the following to work

Max Date = CALCULATE(MAX(Table,[Date]),[Flag $ Forecast Remaining almost zero]=1) to work.

 

The Table Visual below is where I dragged sales column per date [$] and then ran a Running Total quick measure to create [$ Forecast Remaining].

 

 

Dax Help Image 1.PNG

 

Thanks,

1 REPLY 1
v-lili6-msft
Community Support
Community Support

hi, @AntonioLouisa

what do you mean  based on the condition that value of $ Forecast Remaining being almost ZERO.

Is it the min value or absolute value almost zero?

 IF so, you may try to adjust your runningtotal as  beow:

RunningTotal = CALCULATE(SUM(Table1[Sales]),FILTER(ALL(Table1),Table1[Date]<=MAX(Table1[Date])))

then create an absolute value of running total

absolute = CALCULATE(ABS([Sales running total in Date]))

and then get the maxdate

maxdate = CALCULATE(MAX(Table1[Date]),FILTER(Table1,ABS([RunningTotal])=[minabsolute]))

Result

13.JPG

here is pbix, please try it.

https://www.dropbox.com/s/ttgv7xo96zei1ox/Extract%20Max%20Date%20from%20Table%20Visual.pbix?dl=0

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors