Forum Discussion
mwadhwani
8 years agoKudo Kingpin
Sameperiodlastyear function returning "Blank"
Hi Experts, Fact Table: f_WS(dateid,SalesValue) Dimension Date: d_date(dateid,date,quarter,month,year) I want the SalesValue this year and last year in separate measures. Following is the f...
- 8 years ago
Its because in PBI Desktop you can not mark a table as date table. So the year slicer is not reset by sameperiodlastyear. The simplest was would be to adjust your measures.
Previous Year Sales = CALCULATE(Measure, SAMEPERIODLASTYEAR(Dates[date]), ALL(Dates))
- 8 years ago
I downloaded your file, adjusted the meuasure and it works now
vik0810
8 years agoResolver V
Its because in PBI Desktop you can not mark a table as date table. So the year slicer is not reset by sameperiodlastyear. The simplest was would be to adjust your measures.
Previous Year Sales = CALCULATE(Measure, SAMEPERIODLASTYEAR(Dates[date]), ALL(Dates))