Forum Discussion
Month on Month Evolution Measure
- Anonymous4 years ago
Hi Anonymous ,
Sorry for that I could access your sample file. You could refer to this blog to learn How to provide sample data in the Power BI Forum
But I have built a data sample to test:
1. Assume MS% is the column not a measure
2. Add a Date column for calulation later
Date = DATE(LEFT([Year/Month],4),RIGHT([Year/Month],2),1)Then according to my understanding, your expected output may like this:
If so, please try:
MoM Cat 1 = var _pre=CALCULATE(SUM('Table'[MS%]),PREVIOUSMONTH('Table'[Date]),ALLEXCEPT('Table','Table'[Brand],'Table'[Bi Cat 1])) return DIVIDE( _pre-SUM('Table'[MS%]), SUM('Table'[MS%]))Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
Sorry for that I could access your sample file. You could refer to this blog to learn How to provide sample data in the Power BI Forum
But I have built a data sample to test:
1. Assume MS% is the column not a measure
2. Add a Date column for calulation later
Date = DATE(LEFT([Year/Month],4),RIGHT([Year/Month],2),1)
Then according to my understanding, your expected output may like this:
If so, please try:
MoM Cat 1 =
var _pre=CALCULATE(SUM('Table'[MS%]),PREVIOUSMONTH('Table'[Date]),ALLEXCEPT('Table','Table'[Brand],'Table'[Bi Cat 1]))
return DIVIDE( _pre-SUM('Table'[MS%]), SUM('Table'[MS%]))
Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.