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.
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 |
A | 2902 | 2998 |
B | 2191 | 2180 |
C | 4862 | 4480 |
D | 4797 | 3315 |
E | 1379 | 1003 |
Solved! Go to Solution.
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
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
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
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
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:
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
119 | |
105 | |
78 | |
74 | |
52 |
User | Count |
---|---|
145 | |
108 | |
107 | |
90 | |
64 |