# QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

Announcements
Highlighted
New Contributor III

## Multiple If Statements with Set Analysis

Hi All,

I have drawn up a straight table on Qlikview showing our customer names, and the number of bookings we have insured using the below expression, for years 2015/2016/2017/2018;

EG:

=NUM((TextCount({\$<FreightPaid={'Paid in UK'},INSURED={'INSURED'},Year={'2018'}>}INSURED)),'###########,###')

Following on this and to show show if booking numbers have increased or decreased compared to 2017, I have used the below expression to highlight the background colour either Green or Red, depending on an increase or decrease;

if(NUM(TextCount({\$<FreightPaid={'Paid in UK'},INSURED={'INSURED'},Year={'2018'}>}INSURED))>(NUM(TextCount({\$<FreightPaid={'Paid in UK'},INSURED={'INSURED'},Year={'2017'}>}INSURED))), rgb(128,255,120), rgb(255,128,128) )

Would someone be able to let me know how I would also include an if statement into this, to highlight yellow RGB(255,255,128) if the number of insured bookings is the same 2017 compared to 2018?

1 Solution

Accepted Solutions
Esteemed Contributor III

## Re: Multiple If Statements with Set Analysis

May be this?

= if(

NUM(TextCount({\$<FreightPaid={'Paid in UK'},INSURED={'INSURED'},Year={'2018'}>}INSURED))>

NUM(TextCount({\$<FreightPaid={'Paid in UK'},INSURED={'INSURED'},Year={'2017'}>}INSURED)), rgb(128,255,120),

if(

NUM(TextCount({\$<FreightPaid={'Paid in UK'},INSURED={'INSURED'},Year={'2018'}>}INSURED))=

NUM(TextCount({\$<FreightPaid={'Paid in UK'},INSURED={'INSURED'},Year={'2017'}>}INSURED)), RGB(255,255,128), rgb(255,128,128)))

2 Replies
Esteemed Contributor III

## Re: Multiple If Statements with Set Analysis

May be this?

= if(

NUM(TextCount({\$<FreightPaid={'Paid in UK'},INSURED={'INSURED'},Year={'2018'}>}INSURED))>

NUM(TextCount({\$<FreightPaid={'Paid in UK'},INSURED={'INSURED'},Year={'2017'}>}INSURED)), rgb(128,255,120),

if(

NUM(TextCount({\$<FreightPaid={'Paid in UK'},INSURED={'INSURED'},Year={'2018'}>}INSURED))=

NUM(TextCount({\$<FreightPaid={'Paid in UK'},INSURED={'INSURED'},Year={'2017'}>}INSURED)), RGB(255,255,128), rgb(255,128,128)))

New Contributor III

## Re: Multiple If Statements with Set Analysis

Perfect - Many Thanks!