Forum Discussion
AntonioLouisa
7 years agoRegular 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 zer...
v-lili6-msft
7 years agoCommunity 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
here is pbix, please try it.
https://www.dropbox.com/s/ttgv7xo96zei1ox/Extract%20Max%20Date%20from%20Table%20Visual.pbix?dl=0
Best Regards,
Lin