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

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.

Reply
sobsawats
Frequent Visitor

YoY Change of % Market Share

Hi Everyone

 

I am finding how to calculate YoY Change of % Market Share . I have 5 brands and it sales amount in 2015 and 2016. I can display %market share of brand by year but cannot find the way to calculate change (2016-2015) of market share of each band (the far right column in the picture). 

 

Please kindly advise. Thank you very much

 

Regards,

Sobsawat S.

 

Brand Sales2015 Sales2016
A29022998
B21912180
C48624480
D47973315
E13791003

 

YoYChg.JPG

1 ACCEPTED SOLUTION
sobsawats
Frequent Visitor

Hi all,

 

I got some idea and solved it by myself. Let me share with you and welcome any comment or better solutions.

 

Here is raw data

YoYChg1.JPG

 

 

 

 

 

 

 

 

 

 

 

I created 2 measures to calculate market share for year 2015 and 2016 ;

MktShare2015 = DIVIDE(SUM(mktshare[Sales2015]),CALCULATE(SUM(mktshare[Sales2015]),ALL(mktshare[Brand])))

MktShare2016 = DIVIDE(SUM(mktshare[Sales2016]),CALCULATE(SUM(mktshare[Sales2016]),ALL(mktshare[Brand])))

 

and create another measure to see diff of above 2 measures which is my end result (YoY Change of % Market Share) ;

MktShareChg = mktshare[MktShare2016]-mktshare[MktShare2015]

 

DONE

YoYChg2.JPG

 

 

 

View solution in original post

3 REPLIES 3
sobsawats
Frequent Visitor

Hi all,

 

I got some idea and solved it by myself. Let me share with you and welcome any comment or better solutions.

 

Here is raw data

YoYChg1.JPG

 

 

 

 

 

 

 

 

 

 

 

I created 2 measures to calculate market share for year 2015 and 2016 ;

MktShare2015 = DIVIDE(SUM(mktshare[Sales2015]),CALCULATE(SUM(mktshare[Sales2015]),ALL(mktshare[Brand])))

MktShare2016 = DIVIDE(SUM(mktshare[Sales2016]),CALCULATE(SUM(mktshare[Sales2016]),ALL(mktshare[Brand])))

 

and create another measure to see diff of above 2 measures which is my end result (YoY Change of % Market Share) ;

MktShareChg = mktshare[MktShare2016]-mktshare[MktShare2015]

 

DONE

YoYChg2.JPG

 

 

 

Birdjo
Resolver II
Resolver II

Hello @sobsawats

Here's how you can calculate the percentage YoY % change in Power BI:

YoY change =
DIVIDE ( ( [This year data] - [Last year data] ), [Last year data], BLANK () )

Then you can go to the Modeling tab and set the measure as a percentage:

native query.png

 

I hope this works well for you. 🙂

 

 

 

HI @Birdjo

 

Thank for sharing. Your solution and sample of DAX are great but not fit my problem. I might have an unclear problem statement but I can resolve it now.

 

Thanks again

Sobsawat S.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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