Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone, I'm traying to change the color of a bar in a bar chart to RED Based on this expression but I keep getting the 'error in expression' message. Can anyone tell me what I'm doing wrong?
Thanks!
George
= (Sum (AMOUNT_AT_RISK_USD) - Sum (AMOUNT_PREVENTED_USD) - Sum (AMOUNT_RECOVERED_USD))>0, RED())
Assign a single color to each of the expression. Like for Loss you can try adding RGB(192,192,192) within the background color. You don't need any if statements here.
I think you missed the If Statement at the beginning (also made some other changes):
=If(RangeSum(
Sum(AMOUNT_AT_RISK_USD),
-Sum(AMOUNT_PREVENTED_USD),
-Sum(AMOUNT_RECOVERED_USD)) > 0, RED())
Hi Sunny T - Unfortunately this did not work, and I'm wondering if I'm presenting it properly. Each of those amounts are fields in my table. I've now calculated the Loss and made that a field in my table as well.
Each of these fields will be calculated as a sum in my dimension. Using the LOSS as my example I still want that bar to be red but none of the options I try seem to work. I just tried changing the background color in the expression tab which I thought was easy, but that didn't work. I'm confused. What is the simplest way to accomplish this?
I am not sure I understand your setting completely. Would you be able to provide a sample to show what isn't working?
This is a screen grab of my expressions. Each of those expressions represent a different piece of a bar graph that is totaling these by country. I want each of these to have the color I specify and not the color that Qlikview assigned. Hope this helps!! Thanks!
Assign a single color to each of the expression. Like for Loss you can try adding RGB(192,192,192) within the background color. You don't need any if statements here.
Ah, now I got it. Never used the RGB format!! Thanks for your help!!!!!!
You don't have to use RGB(), but that was an example. Red() or Blue() should work as well, but RGB() just give you more options.
I tried both so that I'd understand how to use those functions. I like RGB more because of the differences in colors.
Thanks for your help!
No problem at all
Best,
Sunny