Forum Discussion

mwadhwani's avatar
mwadhwani
Kudo Kingpin
8 years ago
Solved

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...
  • vik0810's avatar
    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))
  • vik0810's avatar
    8 years ago

    I downloaded your file, adjusted the meuasure and it works now