Forum Discussion

ROCKYDO12's avatar
ROCKYDO12
Icon for Helper III rankHelper III
4 years ago
Solved

YTD and LYTD calculation Issue

Hello,

 

I am trying to create some KPI's and I am using the following calculations for CYTD Sales and LYTD Sales:

 

CYTD Sales: CALCULATE(SUM('Sales Base'[Amount]),DATESYTD(('Calendar'[Date]),"3/31"))

LYTD Sales:  CALCULATE(SUM('Sales Base'[Amount]),DATESYTD(dateadd('Calendar'[Date],-1,Year),"3/31"))

 

I have added a date calender and have a relationship between my sales table and calender table. I am having an issue as the amounts are showing full year amounts, instead of YTD. Then when I try to use the Sales table dates inplace for calender dates it shows up as blank.