Skip to content

Instantly share code, notes, and snippets.

@aabundez
Last active November 21, 2019 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aabundez/0537e6cab00a0ab7b85860cb6b6fd536 to your computer and use it in GitHub Desktop.
Save aabundez/0537e6cab00a0ab7b85860cb6b6fd536 to your computer and use it in GitHub Desktop.
//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