Code inside of variables
Hi, are not the codes inside of the variables inserted in the opposite variables than they should be?
If I understand the functions correctly, it makes more sense to be like this:
- %SalesYoYGrowth =
- var salesAmtAllTimeMinusCurrentYear= ([TotalSalesAmount] - CALCULATE([TotalSalesAmount], PARALLELPERIOD(‘CalendarTable’[Date], -12, MONTH)))
- var salesAmtCurrentYear = CALCULATE([TotalSalesAmount], PARALLELPERIOD(‘CalendarTable’[Date], -12, MONTH))
- RETURN
- DIVIDE(salesAmtCurrentYear, salesAmtAllTimeExceptCurrentYear)
0 answers ( 0 marked as helpful)