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.
Hello everybody!
I received a request from a customer, in which she asked for the hierarchical tree data label to be changed, but I'm not getting it.
Basically, I need each step of the hierarchical tree to show as a data label, the percentage in relation to the total of the previous step.
Below is the chart. You can see that the data label contains the total for each category, but what I need is to show the percentage in relation to the previous step. For example, in the step "1ª Rechamada", in the first category "AGENDAMENTO REAPAR...", instead of showing the value "107", I need it to show "26.35%", that is, 107 of the current category divided by 406 of the previous step.
Can you help me?
Solved! Go to Solution.
Hi @juniorjfd
For this you need a measure similar to the one below:
test =
SWITCH (
TRUE (),
ISINSCOPE ( 'Table'[sub] ), DIVIDE ( [count], CALCULATE ( [count], ALLSELECTED ( 'Table'[sub] ) ) ) * 100 ,
ISINSCOPE ( 'Table'[CAt] ), DIVIDE ( [count], CALCULATE ( [count], ALLSELECTED ( 'Table'[CAt] ) ) )* 100,
[count]
)
Be aware that for this to work you need to have the order of the columns to be in the same order has the decomposition tred, if you change the order the values will be strange.
Another thing is what do you want to show on the first value is it the value or the percentage, has tyou can see my value is multiplied by 100 to get the value correct but it does not show the % value, we can do it with a use of the tabular editor to have a condittional formatting applied.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThank you very much! It finally worked!
Hi @juniorjfd
For this you need a measure similar to the one below:
test =
SWITCH (
TRUE (),
ISINSCOPE ( 'Table'[sub] ), DIVIDE ( [count], CALCULATE ( [count], ALLSELECTED ( 'Table'[sub] ) ) ) * 100 ,
ISINSCOPE ( 'Table'[CAt] ), DIVIDE ( [count], CALCULATE ( [count], ALLSELECTED ( 'Table'[CAt] ) ) )* 100,
[count]
)
Be aware that for this to work you need to have the order of the columns to be in the same order has the decomposition tred, if you change the order the values will be strange.
Another thing is what do you want to show on the first value is it the value or the percentage, has tyou can see my value is multiplied by 100 to get the value correct but it does not show the % value, we can do it with a use of the tabular editor to have a condittional formatting applied.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCovering 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 |
---|---|
107 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |