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.
I have a table of data that shows the values for each attribute at the end of each month. like below:
The data model is pretty simple. I have created an Autocalender with a MonthEnd column and the data model look like this:
What I need is a measure that calculates the average of the past six months, not including the current month.
For instance:
- for 12.2021, we need to calculate the average of 11.2021-06.2021
- for 11.2021, we need to calculate the average of 10.2021-05.2021
The ultimate goal is to compare the value for the current month with the average of the past 6 months.
I wrote this measure:
can someone tell me where am I doing wrong?
Solved! Go to Solution.
but this works perfectly:
but this works perfectly:
@elimey Try like, last 6 month before selected month
AVG_LAST_SIX_MONTH =
CALCULATE( AVERAGE(DPD[Value]), DATESINPERIOD('Calendar'[Date], eomonth(MAX('Calendar'[Date]),-1) , -6, MONTH))
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 | |
98 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |