Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

reinholdgraf
Contributor

background-color dependent on several conditions

Need to set the background color of an article number in a pivot-table dependent on the following conditions

- number of customers (distinct) >= X

- quantity >= Y

- sales€ >= Z

For a KPI-figure, i used the following:

count({<Menge = {">=1000"}, KundeNr = {">=25"}>} KundeNr)

But for the background, I have no idea, how to set up a formula with multiple conditions

Reinhold

Tags (2)
1 Solution

Accepted Solutions

Re: background-color dependent on several conditions

You need to combine these conditions porbably per AND like:

if(

     count({<Menge = {">=1000"}, KundeNr = {">=25"}>} KundeNr) > x

          AND

     sum(sales) > y

          AND

     sum(quantity) > z,

green(), red())

- Marcus

4 Replies
vikasmahajan
Honored Contributor III

Re: background-color dependent on several conditions

reinholdgraf
Contributor

Re: background-color dependent on several conditions

value vor quantity and sales€

count for number of customers

Re: background-color dependent on several conditions

You need to combine these conditions porbably per AND like:

if(

     count({<Menge = {">=1000"}, KundeNr = {">=25"}>} KundeNr) > x

          AND

     sum(sales) > y

          AND

     sum(quantity) > z,

green(), red())

- Marcus

reinholdgraf
Contributor

Re: background-color dependent on several conditions

yes, AND is what I need.

Thank you !