Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
the-null
Contributor III
Contributor III

Counting cells in pivot table by color

Within the pivot table, I have a measure XY, whose formula is this. Based on the value my data are colored in red, green and blue color.

If(
[Robna marka naziv] = 'test',
If(
(120/((Sum([Iznos nabavno]))/((Sum([Stanje financijsko 2024])/12)*4)))/30 > 4.9999,
rgb(255,0,0), // Crvena boja ako je iznos > 5
If(
(120/((Sum([Iznos nabavno]))/((Sum([Stanje financijsko 2024])/12)*4)))/30 < 2.9999,
rgb(35,78,222), // Plava boja ako je iznos < 5
If(
(120/((Sum([Iznos nabavno]))/((Sum([Stanje financijsko 2024])/12)*4)))/30 >= 2.9999
AND (120/((Sum([Iznos nabavno]))/((Sum([Stanje financijsko 2024])/12)*4)))/30 <= 4.9999,
rgb(0,255,0), // Zelena boja ako je između 3, 4 ili 5
null() // Ostatak nema boju
)
)
),

How can I represent within the pie chart the amounts of red, blue, and green colors?

 

thenull_0-1717004472696.png

 

Labels (5)
1 Solution

Accepted Solutions
menta
Partner - Creator II
Partner - Creator II

You can create a dimension 

valuelist('red','blue','yellow')

and the expression

if(valuelist('red','blue','yellow')='red',
 
SUM(Aggr(If(
[Robna marka naziv] = 'test',
If(
(120/((Sum([Iznos nabavno]))/((Sum([Stanje financijsko 2024])/12)*4)))/30 > 4.9999,
1), ArticleId (your dimension)))
 
,
if(valuelist('red','blue','yellow')='blue',
 
<expression for blue>
..)))
 
 

 

View solution in original post

1 Reply
menta
Partner - Creator II
Partner - Creator II

You can create a dimension 

valuelist('red','blue','yellow')

and the expression

if(valuelist('red','blue','yellow')='red',
 
SUM(Aggr(If(
[Robna marka naziv] = 'test',
If(
(120/((Sum([Iznos nabavno]))/((Sum([Stanje financijsko 2024])/12)*4)))/30 > 4.9999,
1), ArticleId (your dimension)))
 
,
if(valuelist('red','blue','yellow')='blue',
 
<expression for blue>
..)))