Forum Discussion
filter visually but not the underlying calculation?
- Anonymous4 years ago
Not as eloquent of a solution as i had hoped but using zoom sliders achieved what i was after.
Anonymous , if there is no date filter. using a date table
use today if needed
Rolling 12 Sales =
var _max = maxx(allselcted(date),date[date]) // or today()
var _min = date(year(_max), month(_max)-12,1)
return
CALCULATE(SUM(Sales[Sales Amount]),filter(date, date[date] <=_max && date[date] >=_min))
if you have a date selected and you want to show trend , then you need an independent date table
//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
var _min = eomonth(_max, -12) +1
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))
Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI
Not as eloquent of a solution as i had hoped but using zoom sliders achieved what i was after.