Posted on:

08 Dec 2022

0

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)

Submit an answer