Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Color not matching in pivot chart

Hi Friends,

I created a Pivot Chart with some dimensions. I took sum(target) adn sum(sales)  expressions.

and for difference I took =column(1)-column(2).

For color I coded =if(column(1)-column(2)<>0,RGB(255,0,0),RGB(0,191,0)).

But the problem is some difference  values are in RGB(255,0,0)(RED) and RGB(0,191,0)) (Green).

Is there any better way of giving color to the difference??

Thanks

Pavan

Tags (1)
4 Replies
marcarreras
Valued Contributor

Re: Color not matching in pivot chart

Pavan,

You are doing it fine at setting the color in expression. But the point is that if you want to use red for taget>sales and green for sales>target, then modify the expression:

=if(column(1)-column(2) > 0,RGB(255,0,0),RGB(0,191,0))


Marc.

Not applicable

Re: Color not matching in pivot chart

Hi Marc

I want target<>sales not sales > target

Thanks

marcarreras
Valued Contributor

Re: Color not matching in pivot chart

Pavan,

Sorry for my misunderstood. In that case, I do not get what difference values are you refeering to. Can you post an exammple?

Marc.

Not applicable

Re: Color not matching in pivot chart

Hi Pavan,

as u mentioned ,your issue is.

you are using this condition.

if column 1(sales target)- column 2(sales actual) is not equals to 0,then it should show red else it should show green.

now after that you wrote

but the problem is some difference values are in red and green.

(now as per your condition values will come in green and red only ,according to the condition.if target-sales=0 then it will show green and if target-sales is  not equals to 0 then it will show red.)

is there any betr way to give any color to the difference.

I don't see any issue in this.

If you can explain your issue properly it will b gr8.

thanks

sudhanshu shrivas

Community Browser