Forum Discussion
DAX - 6-month MoM Average Growth
I want to calculate 6-month MoM% in PowerBI.
My last month is Aug 2021. I want to calculate its MoM%.
So, last 6 months are Mar, Apr, May, June, July, Aug 2021.
I want to calculate MoM average as - (Mar mom% + Apr mom% +......+ Aug Mom%)/6
I want to make it dynamic.
Can anyone help.
2 Replies
- Greg_Deckler
Community Champion
Anonymous You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000
Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008Hard to be more specific. Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2. - AnonymousNot applicable
Hi Anonymous ,
I created some data:
2021.2.1 --- 2021.8.17
Here are the steps you can follow:
1. Create calculated column.
Month = MONTH('Table'[date])2. Create measure.
Measure = var _max= MAXX(ALL('Table'),'Table'[Month]) var _summrize= SUMMARIZE(FILTER(ALL('Table'),'Table'[Month]>=_max-5&&'Table'[Month]<=_max),[Month],"Avg",AVERAGE('Table'[amount]) ) return AVERAGEX(_summrize,[Avg])3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly