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,
I'm trying to create a measure which will display the average of the last 3 months
This is what I want is have as a average over the last 3 months. For example, April's % will be an average of April, March and February. January's % will be January 2021, Demember 2020 and November 2020 etc
I tried searching on the forums and came accross this piece of code
3 Month Rolling Average Fall Through =
var threeos = CALCULATE (
AVERAGEX ( VALUES ( 'Date'[Month/Year] ), [Confirmed]),
DATESINPERIOD ( 'Date'[Full Date], MAX ( 'Date'[Full Date] ), -3, MONTH )
)
var threewith =
CALCULATE (
AVERAGEX ( VALUES ( 'Date'[Month/Year] ),[Fall Through]),
DATESINPERIOD ( 'Date'[Full Date], MAX ( 'Date'[Full Date] ), -3, MONTH )
)
return
IFERROR(threewith/threeos, BLANK())
This results in what it looks the next 3 months rather than the previous so I don't think that's right. Here's a screenshot
I'm struggling which is why I came here
Here's the PBIX: https://www.dropbox.com/s/4pbc79tpo9yg59a/help.pbix?dl=0
Any questions let me know
Cheers,
Mike
Solved! Go to Solution.
Hi, @michael_knight
Pleases try the below measure.
3 Month Rolling Average Fall Through =
IF (
ISBLANK ( [Confirmed] ),
BLANK (),
CALCULATE (
AVERAGEX ( VALUES ( 'Date'[Month/Year] ), [Fall Through %] ),
DATESINPERIOD ( 'Date'[Full Date], LASTDATE ( 'Date'[Full Date] ), -3, MONTH )
)
)
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi, @michael_knight
Pleases try the below measure.
3 Month Rolling Average Fall Through =
IF (
ISBLANK ( [Confirmed] ),
BLANK (),
CALCULATE (
AVERAGEX ( VALUES ( 'Date'[Month/Year] ), [Fall Through %] ),
DATESINPERIOD ( 'Date'[Full Date], LASTDATE ( 'Date'[Full Date] ), -3, MONTH )
)
)
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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 |
---|---|
112 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |