Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Highlighted
igor_zhilin
New Contributor III

Qlik Sense: bar chart color by calculated dimension, gives only Null Values color

Dear Qlik enthusiasts:

I need to color a bar chart by calculated dimension, but it is not working. I searched the Community, found similar problems, but no clear explanation to the Sense behavior that I am experiencing. QVF attached.

Goal: classify supplier invoices into 2 categories

  • Potentially Duplicate (>1 invoices for same value and supplier)
  • Not duplicate (only 1 invoice with this value)

Preferably without creating additional columns in the script.

And color the 2 dimension values in a bar chart.

Here is my data:

data.png

I have a calculated master dimension that works:

if(Aggr(Count(distinct [Invoice Nr]), [Supplier Nr],[Value])>1,'Potential Duplicate','Not duplicate')

dim wroks.png

I have assigned colors to the 2 values returned by this calculated dimension:

assigned colors.png

I dragged the dimension in the chart to color by dimension, like in this tutorial‌. However, if I use Colors = Auto, the chart is colored using "Null Values" color (red)!

null color.png

Could you please point where I made an error?

Thank you,

Igor.

1 Solution

Accepted Solutions
mdmukramali
Valued Contributor III

Re: Qlik Sense: bar chart color by calculated dimension, gives only Null Values color

Hi,

Maybe bug,

But work around is here :

Color :

Color by Expression.

=if(Aggr(Count(distinct [Invoice Nr]), [Supplier Nr],[Value])>1,LightMagenta(),LightBlue())


281471.PNG

View solution in original post

6 Replies
Partner
Partner

Re: Qlik Sense: bar chart color by calculated dimension, gives only Null Values color

change it to color by dimension and switch on library colors

linoybar
Valued Contributor

Re: Qlik Sense: bar chart color by calculated dimension, gives only Null Values color

It seems like a bug... any workarounds maybe?

mdmukramali
Valued Contributor III

Re: Qlik Sense: bar chart color by calculated dimension, gives only Null Values color

Hi,

Maybe bug,

But work around is here :

Color :

Color by Expression.

=if(Aggr(Count(distinct [Invoice Nr]), [Supplier Nr],[Value])>1,LightMagenta(),LightBlue())


281471.PNG

View solution in original post

igor_zhilin
New Contributor III

Re: Qlik Sense: bar chart color by calculated dimension, gives only Null Values color

Not helping.

igor_zhilin
New Contributor III

Re: Qlik Sense: bar chart color by calculated dimension, gives only Null Values color

Thank you Mohammed, this works.

Seems like Sense bug indeed.

Basically, this means that for now, until this functionality is fixed, I have to maintain 2 similar formulas:

  • For the calculated dimension
  • For the color expression
linoybar
Valued Contributor

Re: Qlik Sense: bar chart color by calculated dimension, gives only Null Values color

Hi Igor, I've tried this solution as well, and it doesn't work for me.

Which QS version are you using?