Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
nikhilgarg
Specialist II
Specialist II

Color is not shown correctly!!

Hello,

I have attached a samplpe of application. In that i am using expression to color the values above and below threshhold as RED.

And in between threshhold as BLACK.

=if(Sum(Price) > (Avg(Price) + Avg(Price)*0.02) , RGB(255,0,0),

if(Sum(Price) <  (Avg(Price) - Avg(Price)*0.02) , RGB(255,0,0),

if(Sum(Price) >= ((Avg(Price) - Avg(Price)*0.02) and (Sum(Price) <= (Avg(Price) + Avg(Price)*0.02) , RGB(0,0,0),

)))

But same is not happening . Please see...

17 Replies
nikhilgarg
Specialist II
Specialist II
Author

HEy,

It is not working well.

I mean ,  I want the values above High threshhold and below Low threshhold as RED and between High threshhold and LowThreshhold as BLACK. PRice is my field.

How to do this ???

Not applicable

Hi Nikhil,

Look at the attached qvw.

The first 2 conditions you have in the color expression are never true. you can see clearly in the chart.

thats why always 3rd conditrion is true and it remains the same color, you might have to relook at the conditions mentioned in color expression.

Thanks,

Shruthi Reddy

nikhilgarg
Specialist II
Specialist II
Author

HEy,

I cannot open your qvw. Can you tell me here what to do.

Thanks

Not applicable

if you look at the attached image, its a graph with two more expressions added in your qvw.

so the "(Avg(Price) + Avg(Price)*0.02 )" is always greater than sum(Price) and

"(Avg(Price) - Avg(Price)*0.02 )" is always less than sum (price)

but the expression you used for color

=if(Sum(Price) > (Avg(Price) + Avg(Price)*0.02 ), RGB(255,0,0),

if(Sum(Price) <  (Avg(Price) - Avg(Price)*0.02 ), RGB(255,0,0),

if((Sum(Price) >= (Avg(Price) - Avg(Price)*0.02) and Sum(Price) <= (Avg(Price) + Avg(Price)*0.02)) ,rgb(0,0,0))))

the first two conditions are never true so you alwasy get  a single color.

Thanks,

Shruthi Reddy

nikhilgarg
Specialist II
Specialist II
Author

Hey,

I want to compare the Price field with High Threshhold((Avg(Price) + Avg(Price)*0.02 )) and Low Threshhold((Avg(Price) - Avg(Price)*0.02 ))  and put color accordingly.

What should i do ??

nikhilgarg
Specialist II
Specialist II
Author

Hey,

thanks a lot for this. But what does TOTAL makes a difference ??

I was using Sum(Price)/Count(Price)  for average . Was that wrong ??

Please tell

Thanks

antoniotiman
Master III
Master III

I simplify.

You need TOTAL to get all dimension values.

Regards,

Antonio