Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I have my sales data from 2016 (more than 36 Months). I would like to compare my sales Rev of last 12 months vs 12 months prior to last 12 months, i.e last 24 months. I have a date filed as purchase date. I am trying to create a measure. Could you please help me here. Thanks.
so
18 Sept 2018 to 17 Sept 2019
compared to
18 Sept 2017 to 17 Sept 2018
?
@Anonymous Yes. Correct. Like this i am comparing Apples to Apples, Last 12 months Vs 12 months prior.Thanks.
Try
last 12 month Sales = Var _endDate= Maxx(ALLSELECTED('Date'[Date Filer]),ENDOFMONTH('Date'[Date Filer])) Var _start_date= minx(ALLSELECTED('Date'[Date Filer]),DATEADD(STARTOFMONTH('Date'[Date Filer]),-12,MONTH)) return calculate(sum(Sales[Sales Amount]),Sales[Sales Date] >= _start_date && Sales[Sales Date] <= _endDate) last to last 12 Sales = Var _endDate= Maxx(ALLSELECTED('Date'[Date Filer]),DATEADD(STARTOFMONTH('Date'[Date Filer]),-13,MONTH)) Var _start_date= minx(ALLSELECTED('Date'[Date Filer]),DATEADD(STARTOFMONTH('Date'[Date Filer]),-24,MONTH)) return calculate(sum(Sales[Sales Amount]),Sales[Sales Date] >= _start_date && Sales[Sales Date] <= _endDate)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |