Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
//Date Table
Date = CALENDAR (DATE(2012,1,1), DATE(2018,12,31))
Date = CALENDAR ("1/1/2012", 12/31/2018")
//Time Intelligence function
PY Sales = CALCULATE ( SUM ( Sales[Revenue] ), SAMEPERIODLASTYEAR( 'Date'[Date] ) )
PM Sales = CALCULATE ( SUM ( Sales[Revenue] ), PREVIOUSMONTH( 'Date'[Date] ) )
//Ratios
% Growth = DIVIDE(SUM(Sales[Revenue])-[PY Sales],[PY Sales])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment