Skip to main content
Announcements
You can succeed best and quickest by helping others to succeed. Join the conversation.
cancel
Showing results for
Search instead for
Did you mean:
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?

Thanks in advance.

1 Solution

Accepted Solutions
Champion III

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
Champion III

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)))

Contributor III
Author

Perfect - Many Thanks!

Community Browser