Forum Discussion
Display data for previous 6 months
- 4 years ago
Anonymous , If you want to select a month and want to show more than that on the axis/row, the slicer needs to be on 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, -6) +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
- Anonymous4 years ago
HI amitchandak
It helped me a lot a formula used in the video you shared.
Nr of app in the last 6 months=CALCULATE ( DISTINCTCOUNT(FactTable[Original_ID]),DATESINPERIOD (DimDate[Date],EOMONTH( MAX ( DimDate[Date]),-1), -6,MONTH))
Anonymous , If you want to select a month and want to show more than that on the axis/row, the slicer needs to be on 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, -6) +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
HI amitchandak
The problem is that in the same report I have to display different data (measures) for the selected months, for previous month and the last 6 months excluding the selected one, in order to compare the data. So the slicer should be the one from DimDate table.