Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Amit_B
Creator II
Creator II

Colored field bar by Sub-field values

Hi,

I would appreciate help with the following topic:

Let take an example of a bar chart that contains a hierarchical dimension (drill down) of Type and SubType, and their Profit for a specific period.

The easy part - color the bars in Red where the profit in negative.
The complicated part - when displaying the profit by Type, bars should be colored Yellow if their overall profit in positive, but at least one of their subtypes has negative profit.

Amit_B_0-1734442158286.png

In the picture, Type D will be colored red and Type B will be colored yellow (because SubType b20).

I need to use it also in tables and pivots.

Thanks.

Labels (5)
1 Solution

Accepted Solutions
Clement15
Partner - Specialist
Partner - Specialist

Hello,

I used test data so it will have to be adapted, but here is what I got.
I don't know if it is the most optimized though.

Clement15_0-1734445829374.png

Clement15_1-1734445865102.png

Clement15_2-1734445884986.png

 

 

View solution in original post

2 Replies
Clement15
Partner - Specialist
Partner - Specialist

Hello,

I used test data so it will have to be adapted, but here is what I got.
I don't know if it is the most optimized though.

Clement15_0-1734445829374.png

Clement15_1-1734445865102.png

Clement15_2-1734445884986.png

 

 

Amit_B
Creator II
Creator II
Author

I just needed to write 'Sum(value) < 0' but it works!
Thank you very much!