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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Tebbe
Regular Visitor

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
Regular Visitor

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
Regular Visitor

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.