Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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?
Thank you in advance!
Solved! Go to Solution.
@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" )
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@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" )
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
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!
@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/
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
User | Count |
---|---|
139 | |
113 | |
103 | |
73 | |
63 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |