cancel
Showing results for
Did you mean:
Helper II

## Show percentage of parent total - Matrix Visual

Hello,

To be honest, I'm not really sure if what I'm trying to do is possible at all. What I'm trying to do is show the percentage based on the parent total but I want the parent total to display the actual value. Say for example, Address Beach have a total of 500 room night produced in which client2 contributed 96.6% on that 500 room nights. I'm not really sure how to approach this in power BI I just generated this in excel pivout's table and showed the value as % of Parent Total. Is this doable in matrix visual?

1 ACCEPTED SOLUTION
Super User IV

@justivan

You can do it this way but using the FORMAT function. I sed a sample data set in Power BI, you can replicate the same for your data.

``````% of Total =
IF(
ISINSCOPE(financials[Segment]),

DIVIDE(
[Total Sales],
CALCULATE(
[Total Sales],
ALLSELECTED( financials[Segment] )
)
),
FORMAT( [Total Sales], "#,#0" )
)``````

Did I answer your question? Mark my post as a solution! and hit thumbs up
3 REPLIES 3
Super User IV

@justivan

You can do it this way but using the FORMAT function. I sed a sample data set in Power BI, you can replicate the same for your data.

``````% of Total =
IF(
ISINSCOPE(financials[Segment]),

DIVIDE(
[Total Sales],
CALCULATE(
[Total Sales],
ALLSELECTED( financials[Segment] )
)
),
FORMAT( [Total Sales], "#,#0" )
)``````

Did I answer your question? Mark my post as a solution! and hit thumbs up
Helper II

Hi @Fowmy ,
This is it! I tried using IF and ISFILTERED to identity the hierarchy then do the calculations according to the result but have given up because of the formats. Parent is number so the child are showing decimals. I didn't know you can do it that way. I'll certainly look into that ISINSCOPE function but if you could tell me, is ISFILTERED  a valid approach too? Thank you so much for this!

Super User IV

@justivan
You can use ISFILTERED but if you insert a slicer with Segment, the measure would not give you the expected results. ISINSCOPE check if the column is grouped within the query.

Find more details here: https://dax.guide/isinscope/

Did I answer your question? Mark my post as a solution! and hit thumbs up

Announcements

#### 2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

#### Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Top Solution Authors
Top Kudoed Authors