Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Tebbe
New Member

How do I set the correct colour in the decomposition tree?

Hello, I have a question regarding the colour in a decomposition tree.

I would like to create a KPI tree that should show me in colour whether I have reached the target (bar should be green) or not (bar should be red).

 

I have created an extra variable for this, which looks like this:

Color =
VAR SumValue = LOG_Kosten_nach_Produkten[Gesamtkosten]
VAR Target = LOG_Kosten_nach_Produkten[TargetValue]
RETURN
SWITCH(
   TRUE(),
   SumValue > Target, "Red",
   SumValue < Target, "Green",
   SumValue = Target, "Yellow"
)

Now I have taken the field value from the variable Color for the colour in my tree. (Analysis tree -> Conditional formatting -> Colour for data bar -> Field value -> Color)

 

Unfortunately, the correct colour is only ever displayed in the child node (rightmost node). As soon as I expand other nodes, the colour of the parent node changes to the wrong colour.

 

If I now display all relevant variables in a table, the correct colour is displayed , even if I select a specific path in the tree (see picture).

 

What could be the reason that the tree displays the colours in the parent nodes incorrectly? 

Tebbe_0-1712133916273.png

 

The picture shows again what the problem is. I have selected LOM 2 by double-clicking in the tree. The values "Gesamtkosten" and "TargetValue" are the same, but the colour red is displayed in the tree. 
In the table above, the values are the same as in the tree (also the same) and the correct colour is displayed (yellow). Why is the colour red displayed in the tree, although the values are the same and according to the logic the colour should be yellow?   

 

 

Thank you for your help.

 

1 ACCEPTED SOLUTION
Tebbe
New Member

The problem has been solved, the error was that in Visual formatting -> Options -> Scale to: Top node and not Parent node.

 

Thanks for your help 😄 

View solution in original post

2 REPLIES 2
Tebbe
New Member

The problem has been solved, the error was that in Visual formatting -> Options -> Scale to: Top node and not Parent node.

 

Thanks for your help 😄 

lbendlin
Super User
Super User

That's a great topic, and very similar to the issues you have in matrix visuals.  You will need to incorporate ISINSCOPE in your calculations.

 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.