powerbilead
New Member
Hi Team,
I am trying to calculate Current Year Sales and Previous Sales. I have a Date table and sales table with a one to many relationship.
SalesCY = CALCULATE(tblsales[TotalSales], YEAR(dates[Date]) = YEAR(TODAY()))
SalesPY = CALCULATE(tblsales[TotalSales], SAMEPERIODLASTYEAR(dates[Date]))
I have attached sales data file
I am trying to calculate Current Year Sales and Previous Sales. I have a Date table and sales table with a one to many relationship.
SalesCY = CALCULATE(tblsales[TotalSales], YEAR(dates[Date]) = YEAR(TODAY()))
SalesPY = CALCULATE(tblsales[TotalSales], SAMEPERIODLASTYEAR(dates[Date]))
I have attached sales data file