Forum Discussion
Anonymous
5 years agoNot applicable
DAX formula help
I would need help creating DAX and designing data model. Table1: start date end date Unit $ value 1/1/2010 1/1/2011 A 100 1/3/2010 1/3/2011 B 200 1/4/2010 1/4/2011 C 300 ...
amitchandak
5 years agoSuper User
Anonymous , Try a measure like.
measure
var _max = maxx(allselected(Date), Date[Date])
return
calculate(sum(Table[Value]), filter(Table, Table[Start Date] <=_max && Table[End Date] >=_max))
or use all of allselected
measure
var _max = maxx(allselected(Date), Date[Date])
return
calculate(sum(Table[Value]), filter(all(Table), Table[Start Date] <=_max && Table[End Date] >=_max))