Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

johnkoegel
New Contributor

Background Color Expression with NULL Values

Hi,

I would like to have the background color for a pivot table that has NULL values in a calculated dimension field     

[

if((Sum(SalesAmt)/Sum(Total<[Region],[SalesRepName]>SalesAmt)) > 0, Sum(SalesAmt)/Sum(Total<[Region],[SalesRepName]>SalesAmt), 0)

]

Here is what I was thinking:

Colormix1(if((Sum(SalesAmt)/Sum(Total<[Region],[SalesRepName]>SalesAmt)) = 0,0), red() , white())

I am seeing "-" as opposed to 0, and I think this is causing my colormix function to fail.

Tags (1)
5 Replies

Re: Background Color Expression with NULL Values

In that case may be this:

Colormix1(if(Len(Trim((Sum(SalesAmt)/Sum(Total<[Region],[SalesRepName]>SalesAmt)))) = 0, 0), red() , white())

johnkoegel
New Contributor

Re: Background Color Expression with NULL Values

Hi Sunny,

That did not work

Screen Shot 2015-10-15 at 3.40.41 PM.png

Re: Background Color Expression with NULL Values

Are there NULL or missing values?

BTW. NULL is not 0 -  is a unknown value.

Here is a topic on this

Missing values in PivotTable

and so far there is not much you can do.

(You can suppress missing value in QV)

johnkoegel
New Contributor

Re: Background Color Expression with NULL Values

Thanks Robert

Re: Background Color Expression with NULL Values

See my post above..

Community Browser