Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ananyaghosh
Creator III
Creator III

Need straight Table coloring help

Hi,

I have attached an application. There 4 input text fields are there. My requirement is when I will enter max and Min values in two text field then the color of that straight table will change and when I again enter max and Min values in other two text field then the color of that straight table will change among the first colored rows.

I have done the my first requirement. But my second requirement is not fulfilled yet.

I have used the below expression in background of my expression:

if(only([Value Per SQ Ft])>vMinValue and only([Value Per SQ Ft])<vMaxValue,Red(),

if(only([Value Per SQ Ft])> vAnotherMin and only([Value Per SQ Ft])< vAnotherMax, Blue()))

If I enter values between 15 and 29 the rows that between those values are marked as red. But I want that when I will give values 17 and 20 the rows of those values will be turned blue among the red rows.

Please help me.

6 Replies
sunny_talwar

Try this:

=If(only([Value Per SQ Ft]) >= vAnotherMin and only([Value Per SQ Ft]) <= vAnotherMax, Blue(),

If(only([Value Per SQ Ft]) > vMinValue and only([Value Per SQ Ft]) < vMaxValue, Red()))

and also make sure that you input max value in max and min value in min. Your application had 22 for Another Min and 21 for Another Max.

Attaching your qvw for reference.

HTH

Best,

Sunny

Gysbert_Wassenaar

You need the more restricting clause first. So switch the two sets of conditions around:

=if(only([Value Per SQ Ft])>= vAnotherMin and only([Value Per SQ Ft])<=vAnotherMax,Blue(),

  if(only([Value Per SQ Ft])> vMinValue and only([Value Per SQ Ft])< vMaxValue, Red()))

And make sure to put a larger value in the Another Max input box than in the Another Min input box. If you use 22 for min and 21 for max then no value will ever fit those conditions. Nothing can be larger than 22 and also smaller than 21.


talk is cheap, supply exceeds demand
prajapatiamar38
Creator II
Creator II

Hi...

But is it possible what value we are entering in the vAnotherMin and vAnotherMax variable only those two values color should be changed not in between those two variables.

Thanks

Gysbert_Wassenaar

But is it possible what value we are entering in the vAnotherMin and vAnotherMax variable only those two values color should be changed not in between those two variables.

I can understand the individual words in that sentence, but I have no idea what you're trying to say.


talk is cheap, supply exceeds demand
Not applicable

Do you mean that only the rows containing the values mentioned in variable vAnotherMin and vAnotherMax (in your app 21 and 22) will be blue?

sunny_talwar

Try this expression for text color:

=If(only([Value Per SQ Ft]) = vAnotherMin or only([Value Per SQ Ft]) = vAnotherMax, Blue(),

If(only([Value Per SQ Ft]) > vMinValue and only([Value Per SQ Ft]) < vMaxValue, Red()))