Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
carlovsky
Helper II
Helper II

Month on Month Evolution Measure

Hello Guys,

I need your help

I'm trying to input a MoM share growth measure on a PBI Matrix, but I can't . Can you help?

 

Example:

Month 1: 5% share

Month 2: 10 % share

Desired output:
Example:
So in Month 2 in the column MoM Cat 1 should be: (Past - Present) / (Present) or ( 0.05 - 0.10) / 0.10 = 50% growth

carlovsky_0-1651154277168.png

 

Sample File:

Sample 

 

 

Thanks a lot

1 ACCEPTED SOLUTION
v-eqin-msft
Community Support
Community Support

Hi @carlovsky ,

 

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

 

Eyelyn9_1-1651544123369.png

 

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)

Eyelyn9_2-1651545089345.png

 

Then according to my understanding, your expected output may like this:

Eyelyn9_0-1651544113519.png

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:

Eyelyn9_3-1651545271532.png

 

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.

View solution in original post

1 REPLY 1
v-eqin-msft
Community Support
Community Support

Hi @carlovsky ,

 

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

 

Eyelyn9_1-1651544123369.png

 

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)

Eyelyn9_2-1651545089345.png

 

Then according to my understanding, your expected output may like this:

Eyelyn9_0-1651544113519.png

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:

Eyelyn9_3-1651545271532.png

 

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.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.