Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi Gurus
I am a POWER BI newbie.. and I am stuck with something rather dumb.....
I have a example dataset like below
| Market | Brand | Pack | Value Sales | Time |
| X | A | Small | 100 | Q1'20 |
| X | A | Large | 20 | Q1'20 |
| X | A | X Large | 10 | Q1'20 |
| X | B | Large | 70 | Q1'20 |
| X | B | Small | 20 | Q1'20 |
I have a measure as below to calculate total brand market share and its working well
Hi @Anonymous ,
According to your description, you want the values of Pack column adds to the value of brand according to the weight of Value Sales.
Here's my solution, modify your formula like this:
ValShare Brand =
DIVIDE (
SUM ( 'MAINTABLE'[Value SALES] ),
CALCULATE ( SUM ( 'MAINTABLE'[Value SALES] ), ALL ( 'MAINTABLE' ) )
) * 100
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello!
thanks for the reply, I tried this but ended up getting 100% as a result for all brands 😞
Could it be because of my relationships of tables?
please see below, I have relationships to Date table and a separate pack size table from the main table. Teh separate packsize table just helps me club several packs into custom labels
@Anonymous , You might have to create two measures and switch using isinscope
https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/
similar example
IsInScope - Switch Rank at different levels: https://youtu.be/kh0gezKICEM
ValShare pack size=
DIVIDE (
SUM ( MAINTABLE[Value SALES)] ),
CALCULATE ( SUM ( MAINTABLE[Value sales ] ), ALL ( MAINTABLE[Pack Size] ) )
) *100
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |