Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Text Colour and Background colour in a Pivot Chart

Hi all,

sounds like stupid question but i just can't get the text colour or background colour to work in this instance...

I have been able to in other instances but here it's not working for me...

I have qlikview pivot chart, in which I have a dimension (ISHCQTYAvailable) which has been pre-calculated in the load script, this gives the quantity available for a particular product.

I want the text to be red if it's in the negative, and green if it's in the positive and black, if it's just 0.

So in "Text Colour" under that dimension I have the following:

=IF(ISHCQTYAvailable > 0, Green(),

     IF(ISHCQTYAvailable < 0, Red(), Black()))

why isn't this working for me - any ideas?

Thanks in advance everybody!!

Fab

20 Replies
mostwanted123
Creator
Creator

Hi Fabrizio,

Try like this,

Go to expression -->Text Color -->

if( ISHCQTYAvailable >=0  ,rgb(0,128,0),

if( ISHCQTYAvailable < 0  ,rgb(255,0,0),

rgb(0,0,0) ) )

Regards,

Pratik

Anonymous
Not applicable
Author

Hi PM,

Thanks for your post and instructions...

That's exactly what I did and it works in a straight table but not a pivot table..

I have no Null values in thus dimension (there was a bug that was mentioned elsewhere about NULLs and colour)

Does your colour work if your chart is a pivot Table?

Anonymous
Not applicable
Author

hi Pratik,

same thing unfortunately - works in straight table but not in a pivot table...

got me scratching my head... i need this in pivot table format, and i don't want to make this an expression... I don't understand why this won't work in a pivot table....

anyone come across this?

prma7799
Master III
Master III

Yes Its works...

Please try and let me know.

mostwanted123
Creator
Creator

Hi Fabrizio,

Can you share your qvw file ?

Anonymous
Not applicable
Author

Hi PM

I appreciate your feedback...

Can you please explain what <Column (2)> represents in your picture?

If my dimension is <QTYAvailable> isn't that what I should be referencing in my colour expression?

if ou could let me know that would be great...

thanks

Fab

afsarshaikh
Creator
Creator

Try,

if( len((ISHCQTYAvailable) > 0, Green(),

if( len((ISHCQTYAvailable) < 0, Red(), Black()

))

Regards,
Afsar Shaikh
Project Manager- QlikView Dev. & Support
Afsar Shaikh
Email- afsar.shaikh@live.com
Anonymous
Not applicable
Author

I can't Pratik unfortunately,

it is way too large and it connects to our in house ODBC, plus it's confidential information...

I understand this makes it hard though and appreciate any help...

prma7799
Master III
Master III

Column (2) is my measurable value.


You have to take reference for your column on which criteria you want to color your dimension above screen shot showing sales % wise therapy with background color  

Neymar_Jr
Creator II
Creator II

May be this

IF(ISHCQTYAvailable > 0, 'Green()',

     IF(ISHCQTYAvailable < 0, 'Red()', 'Black()'))