The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
This is driving me little crazy - I'm trying to measure a rolling average only in a period 12 months prior to a given date.
I'm getting the correct values for the correct months, but for some reason it's also returning some odd value (an average over the whole selected period?) for all other months as well.
I copied this pretty closely from another measure (12-week rolling average of [measure] for 12 weeks prior to selected date), and that one returns blanks for any dates outside the period. I've compared them closely, but I have no idea why they behave differently.
Here are the measures:
And here's a screenshot of the values:
Solved! Go to Solution.
Hi @dblair ,
Have tried something like below?
12m Average Files Opened 12m prior to selection =
VAR FilesOpened_Sum_ =
CALCULATE (
[Files Opened],
DATESINPERIOD ( 'Calendar'[Date], MAX ( 'Calendar'[Date] ), - 12, MONTH )
)
RETURN
DIVIDE ( FilesOpened_Sum_, 12 )
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @dblair ,
Have tried something like below?
12m Average Files Opened 12m prior to selection =
VAR FilesOpened_Sum_ =
CALCULATE (
[Files Opened],
DATESINPERIOD ( 'Calendar'[Date], MAX ( 'Calendar'[Date] ), - 12, MONTH )
)
RETURN
DIVIDE ( FilesOpened_Sum_, 12 )
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Replacing my "12-Month Average Files Opened" Measure with this formula caused my "12m Average 12 motnhs prior to the selected month" measure to start working!
Still don't know why, but thanks!
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
33 | |
13 | |
12 | |
9 | |
7 |