Forum Discussion
LMTD using date slicer selection
- 2 years ago
Hi,
Create a Calendar Table with a relationship (Many to One and Single) from the Date column of the Fact Table to the Date column of the Calendar Table. To your slicer, drag Date from the Calendar Table and select a range of dates. Write this measure
Sales = sum(Data[Amount])
Sales in same period last month = calculate([Sales],datesbetween(calendar[date],edate(min(calendar[date]),-1),edate(max(calendar[date]),-1)))
Hope this helps.
Hi,
Create a Calendar Table with a relationship (Many to One and Single) from the Date column of the Fact Table to the Date column of the Calendar Table. To your slicer, drag Date from the Calendar Table and select a range of dates. Write this measure
Sales = sum(Data[Amount])
Sales in same period last month = calculate([Sales],datesbetween(calendar[date],edate(min(calendar[date]),-1),edate(max(calendar[date]),-1)))
Hope this helps.