Forum Discussion
Anonymous
6 years agoNot applicable
$ Difference between MIN and MAX dates
Hello, I am trying to create a card showing the difference in ACV between the MAX date and the MIN date. This is tied to a date filter on a bar graph, so when the user switches years on the graph, th...
- 6 years ago
Anonymous
Try like
measure = var _max = maxx('Date','Date'[Date]) var _min = Minx('Date','Date'[Date]) return CALCULATE(SUM(Table[ACV]), FILTER(all('Date'), 'Date'[Date] =_max)) -CALCULATE(SUM(Table[ACV]), FILTER(all('Date'), 'Date'[Date] =_min)) /////////////////////////////////Or measure = var _max = maxx('Date','Date'[Date]) var _min = Minx('Date','Date'[Date]) return CALCULATE(SUM(Table[ACV]), FILTER(all('Date'), year('Date'[Date]) =year(_max))) -CALCULATE(SUM(Table[ACV]), FILTER(all('Date'), year('Date'[Date]) =year(_min)))
amitchandak
Super User
6 years agoAnonymous
Try like
measure =
var _max = maxx('Date','Date'[Date])
var _min = Minx('Date','Date'[Date])
return
CALCULATE(SUM(Table[ACV]), FILTER(all('Date'), 'Date'[Date] =_max)) -CALCULATE(SUM(Table[ACV]), FILTER(all('Date'), 'Date'[Date] =_min))
/////////////////////////////////Or
measure =
var _max = maxx('Date','Date'[Date])
var _min = Minx('Date','Date'[Date])
return
CALCULATE(SUM(Table[ACV]), FILTER(all('Date'), year('Date'[Date]) =year(_max))) -CALCULATE(SUM(Table[ACV]), FILTER(all('Date'), year('Date'[Date]) =year(_min)))- Anonymous6 years agoNot applicableamitchandak , this worked great. Thanks!