Forum Discussion
Anonymous
6 years agoNot applicable
Month on month comparison
Hi, Raw data: Date Sales Customer name 25-07-2020 500 Pavan 26-07-2020 800 suresh 27-07-2020 1000 sai 28-07-2020 500 naresh 01-06-...
amitchandak
Super User
6 years agoAnonymous , Try like. You need two date table, both have month year in that. Keep slicer from each one .
measure1 =
var _min = minX(allselected(Date,Date[Date]))
var _max = manX(allselected(Date,Date[Date]))
return
calculate(sum(Table[Sales]), filter(Table,Table[Date]>=_min && Table[Date]<=_max))
Use the crossfilter is Date is joined and active.
measure2 =
var _min = minX(allselected(Date1,Date1[Date]))
var _max = manX(allselected(Date1,Date1[Date]))
return
calculate(sum(Table[Sales]), filter(Table,Table[Date]>=_min && Table[Date]<=_max))
//calculate(sum(Table[Sales]), filter(Table,Table[Date]>=_min && Table[Date]<=_max), crossfilter(Table[Date],Date[Date],none))