Hi folks,
I would like to get the sale value of previous month of last year.
For example:
In Jan 2021, I wish to get the value in Dec 2019.
In Feb 2021, I wish to get the value in Jan 2020.
In Mar 2021, I wish to get the value in Feb 2020.
....
Any input is highly appreciated. Thanks in advance!
Solved! Go to Solution.
@tracytran91 , With date table and time intelligence
Try like example
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-13,MONTH)))
13 Month behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-13,Month))
Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA
Proud to be a Super User!
@tracytran91 , With date table and time intelligence
Try like example
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-13,MONTH)))
13 Month behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-13,Month))
Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA
Proud to be a Super User!
@tracytran91 , you might use a standard date table in the data model, then leverage DATEADD(Calendar[Date], -13, Month) to retrieve desired month.
Featured Session: Drive Data Culture with Power BI- Vision, Strategy & Roadmap. Register here https://myignite.microsoft.com #MSIgnite #PowerPlatform #Power BI
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
User | Count |
---|---|
465 | |
180 | |
118 | |
61 | |
52 |
User | Count |
---|---|
443 | |
162 | |
128 | |
75 | |
73 |