Skip to content

Instantly share code, notes, and snippets.

@aabundez
Created November 24, 2019 20:11
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/520a1ce8e533b06aabef97a1d18570e0 to your computer and use it in GitHub Desktop.
Save aabundez/520a1ce8e533b06aabef97a1d18570e0 to your computer and use it in GitHub Desktop.
Prior period DAX calculation using automatic time intelligence in Power BI
Prior Month Sales = CALCULATE ( SUM( Sales[Revenue] ), PREVIOUSMONTH( Sales[Date].[Date] ) )
// Quick measure uses DATEADD function instead
Prior Month Sales = CALCULATE ( SUM( Sales[Revenue] ), DATEADD( Sales[Date].[Date], -1, MONTH ) )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment