The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I am trying to build a matrix table that will show the value as well as the percentage. I have included screenshot below. I am stuck with the grand total percentage as it now shows the grand total of each row instead of 100%.
This is the data source:
I am building the table to show it as is in the matrix format but i am unable to get the column D (state share portion) right. It either will show Grand total as 500% or it will calculate percentage by row to make the grand total of 100%.
Can someone please help?
Solved! Go to Solution.
Hi,
I am not sure how your semantic model looks like but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
State share percentage: =
SWITCH (
TRUE (),
ISINSCOPE ( 'Product'[Product] ),
DIVIDE (
[Total Quantity:],
CALCULATE ( [Total Quantity:], ALL ( 'Product'[Product] ) )
),
ISINSCOPE ( State[State] ),
DIVIDE (
[Total Quantity:],
CALCULATE (
[Total Quantity:],
ALL ( 'Product'[Product] ),
ALL ( State[State] )
)
),
DIVIDE (
[Total Quantity:],
CALCULATE (
[Total Quantity:],
ALL ( 'Product'[Product] ),
ALL ( State[State] )
)
)
)
Thank you, it works! 🙂
Hi,
I am not sure how your semantic model looks like but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
State share percentage: =
SWITCH (
TRUE (),
ISINSCOPE ( 'Product'[Product] ),
DIVIDE (
[Total Quantity:],
CALCULATE ( [Total Quantity:], ALL ( 'Product'[Product] ) )
),
ISINSCOPE ( State[State] ),
DIVIDE (
[Total Quantity:],
CALCULATE (
[Total Quantity:],
ALL ( 'Product'[Product] ),
ALL ( State[State] )
)
),
DIVIDE (
[Total Quantity:],
CALCULATE (
[Total Quantity:],
ALL ( 'Product'[Product] ),
ALL ( State[State] )
)
)
)
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
8 | |
8 |