Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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?
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?
Yes Its works...
Please try and let me know.
Hi Fabrizio,
Can you share your qvw file ?
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
Try,
if( len((ISHCQTYAvailable) > 0, Green(),
if( len((ISHCQTYAvailable) < 0, Red(), Black()
))
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...
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
May be this
IF(ISHCQTYAvailable > 0, 'Green()',
IF(ISHCQTYAvailable < 0, 'Red()', 'Black()'))