Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Jonathan_Alm
Partner - Creator
Partner - Creator

Mini chart in straight table color

Hi,

I have created a mini-chart in a straight table and I am having problems getting the colors to match the intended output.

The measure is as follows:

IF(count({
$<
[Category] = {'F','G'}
>}
[ID])>0,-1,
IF(count({
$<
[Category] = {'A','B','C','D','E'}
>}
[ID])>=0,1))

(So all categories F,G, gets -1 and all categories A-E gets 1)

This measure is the displayed as a mini chart with CODE as dimension.

The output is one green bar for every Code with category A,B,C,D,E and a red bar for every code with category with  F,G.

(see screenshot).

However, when there are only Codes with categories F,G the bar will also be green since I can only choose the following colors:

Max Value Color = Green

Min Value Color = Red

So when there are only "-1" Categerories all will be green until there is one category with a A,B,C,D,E.

Can I get around this somehow?

 

Kind regards Jonathan

 

 

Labels (2)
1 Solution

Accepted Solutions
Jonathan_Alm
Partner - Creator
Partner - Creator
Author

Hi, sorry my bad. There was already a built in solution to this in the diagram, called Positive/Negative in the Type of display (bars, dots, sparkline, positive/negative) Choosing that type and the code above which types -1 and +1 made the diagram behave the way I wanted it.

View solution in original post

1 Reply
Jonathan_Alm
Partner - Creator
Partner - Creator
Author

Hi, sorry my bad. There was already a built in solution to this in the diagram, called Positive/Negative in the Type of display (bars, dots, sparkline, positive/negative) Choosing that type and the code above which types -1 and +1 made the diagram behave the way I wanted it.