Forum Discussion

aamoody81's avatar
aamoody81
Regular Visitor
8 years ago
Solved

SAMEPERIODLASTYEAR for only values in current year

Hi,   I'm trying to show the value from prior year for products. I only want the products that are present in the current year to show.      What I would like: Product SamePeriodSalesLastYear ...
  • Ashish_Mathur's avatar
    8 years ago

    Hi,

     

    Try this

     

    =IF([Sum of ProductSales]=0,BLANK(),CALCULATE([Sum of ProductSales], SAMEPERIODLASTYEAR(D_DATE[DATE])))

     

    Hope this helps.