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

WORKING WITH TORNADO CHART FOR GENDER COUNT

Hello , help with a code for tornado chart  , its giving me negatives for one gender 

if([GENDER]='F',
Num(count(if(YEAR([TRANSACTION_DATE])=vCY AND COUNTRY='INDIA', ID))*-1),
Num(count(if(YEAR([TRANSACTION_DATE])=vCY AND COUNTRY='INDIA', ID)))
)

my graph is this

DGAL1_0-1713355289208.png

In addition , how do i color with own colors for F and M , the below is the code am using but its not workingif([GENDER]='F', '#000000','#C51633')

Labels (2)
1 Reply
Chanty4u
MVP
MVP

Try this 

if([GENDER]='F',

   Num(count(if(YEAR([TRANSACTION_DATE])=vCY AND COUNTRY='INDIA', ID))),

   Num(count(if(YEAR([TRANSACTION_DATE])=vCY AND COUNTRY='INDIA', ID)))

 

 

For gender color 

if([GENDER]='F', RGB(0, 0, 0), RGB(197, 22, 51))

 

)