Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ontoit7331
Contributor II
Contributor II

Pie Chart 4 field values and 2 groups

Hello All experts,

I've got a problem with my piechart.

I want so count two fieldvalues as one and two other fieldvalues as one and then subtract a sum from the right group.

DATA:

Field1value 1 = 10

Field1value 4 = 8

Field1value 2 = 4

Field1value 6 = 2 

Dim

if(field1=1 or field1=4,'ABC',if(field1=2 or field1=6,'DEF'))

 

now this should give you

ABC=18 - 75% of the total of 24

DEF=6 - 25% of the total of 24

 

now here comes the hard part.

I want to subtract and + a sum from/to the field1 depending in which group it is in.

ex(that doesnt work):

if(valuelist('ABC','DEF')='ABC',count(if(field1='ABC',field1))-sum(field2),count(if(field1='DEF',field1))+sum(field2))

 

lets say that field2 = 3

it would give us this pie chart:

ABC=15 - 62,5%

DEF=9 - 37,5%

 

is this achievable?

Sorry for my bad grammar.

Thanks in advance and have a nice day.

/Rob

 

0 Replies