March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
HI, all
I'd like to get monthly moving average by making measure as below, but it may not work well
Could you please help me
------------------------------------------------------------
<Measure>
<Table>
Sales
Calendar
------------------------------------------------------------
@mangaus1111
Sorry I was wrong
What I'd like to get is 12 (average of sum of April "10" and sum of May 14 )
@mangaus1111
Thanks a million!
Based on your sample, what I'd like to get is 5.5(average of April 5 and May 6)
then in the end what you want is the moving average of a moving average
@mangaus1111
I wrote this measure as below accordingto your advise
But, result is not as I expected.
It seems that average is calculated on a daily basis not monthly.
Is your model not like this?
Hi @taimaizumi ,
try this measure
Moving Average Last 2 Months =
VAR _MaxMonth = MAX('Date'[Year*Month])
RETURN
CALCULATE(AVERAGEX('Facts5','Facts5'[Sales]),
'Date'[Year*Month]>= _MaxMonth -1 && 'Date'[Year*Month] <= _MaxMonth
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
HI, @mangaus1111
Sorry, my explanation was not enough
What I'd like to get is "moving" average among this month and previous month by month and product
But if the granularity of your report is Product and Month, then you need a simple Averagex.
Hi @mangaus1111
Thank you for you quick response.
Output image is below.
I'd like to get result by monthly and products.
Hi @taimaizumi ,
in the row of the matrix do you want Day and Product or Month and Product?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
108 | |
73 | |
54 | |
52 | |
44 |
User | Count |
---|---|
161 | |
112 | |
67 | |
60 | |
50 |