Forum Discussion
YoY Calculations
- 8 years ago
Hi,
Try this
- Create a calendar table by using the following formula under Modelling > New Table
=CALENDAR(MIN('Order Line'[Created Date]),MAX('Order Line'[Created Date]))
- Create a relationship between the Created Date column of the Order Line table to the Date column of the calendar table
- In the calendar table, create colums for Quarter, Month, year etc.
- In the visual, drag the time period (Year or quarter or month) from the Calendar Table
- Write these measures:
MM Total Revenue All Time = SUM('Order Line'[Total Revenue])
MM Total Revenue Last Year Calc = CALCULATE([MM Total Revenue All Time],SAMEPERIODLASTYEAR(Calendar[Date]))
MM Revenue YoY Change = DIVIDE( [MM Total Revenue All Time] - [MM Total Revenue Last Year Calc] , [MM Total Revenue Last Year Calc])
Hope this helps.
Hi,
Try this
- Create a calendar table by using the following formula under Modelling > New Table
=CALENDAR(MIN('Order Line'[Created Date]),MAX('Order Line'[Created Date]))
- Create a relationship between the Created Date column of the Order Line table to the Date column of the calendar table
- In the calendar table, create colums for Quarter, Month, year etc.
- In the visual, drag the time period (Year or quarter or month) from the Calendar Table
- Write these measures:
MM Total Revenue All Time = SUM('Order Line'[Total Revenue])
MM Total Revenue Last Year Calc = CALCULATE([MM Total Revenue All Time],SAMEPERIODLASTYEAR(Calendar[Date]))
MM Revenue YoY Change = DIVIDE( [MM Total Revenue All Time] - [MM Total Revenue Last Year Calc] , [MM Total Revenue Last Year Calc])
Hope this helps.