Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have an application in QlikView with a table that contains values depending among others on two variables.
The expression is as follows:
=Sum({$<Amount={'>=$(=vFilterLow)<$(=vFilterHigh)'}>}Value)
To set vFilterLow and vFilterHigh I use an input box.
I can change the variables and the table reacts as expected. Only, when I put in rubbish like vFilterLow=1000 and vFilterHigh=0 I expect zero values in the table (since none of the amounts is greater than 1000 and smaller than 0). However, the table does contain rows.
What is happening here?
I hope you can help me. Thanks in advance.
Janneke.
Yes, of course there is a fix for this. It's still pretty ridiculous to let users specify amount restrictions like
1000 < Amount < 50
so we should add a couple of constraints to the From: and To: values. Just like what is commonly done when using variables to specify calendar periods (e.g. From should come before Until and vice versa)
For each input variable, add a Custom constraint on the Constraints tab to force input values
Also add default values for each variable, optionally based on the minimum and maximum values of the field you try to filter (like =Min({1}Amount) and =Max({1}Amount) )
Best,
Peter
Is your expression working with different set of values entered? If yes, then can you share your sample to look into please?
Hi,
This is an example of my problem.
I hope this makes it easier to understand the issue.
Thank you all for helping.
Janneke.
Hmmm, I get this:
This is not what you expect?
IS this not what you are getting?
Hi Vishwarath,
If you 'play' with the input variables, you'll see that sometimes it shows the right table, but also it can show values.
For instance, if I immediately put in 1000 and 0 I get your screenshot. If I then change the 0 to 200 I get this:
And this is also an outcome:
It doesn't always show what I expect....
Hi Peter,
Please check the answer I gave to Vishwarath.
Yes, your screenshot is what I expect with these values. In the provided sample I simplified my application, I guess that's why the outcome is different than my original application .
If you 'play' with the variables you see unexpected outcomes (at least unexpected for me), such as shown in my reply to Vishwarath.
Do you have any suggestions on how to fix this?
Janneke.
Yes, of course there is a fix for this. It's still pretty ridiculous to let users specify amount restrictions like
1000 < Amount < 50
so we should add a couple of constraints to the From: and To: values. Just like what is commonly done when using variables to specify calendar periods (e.g. From should come before Until and vice versa)
For each input variable, add a Custom constraint on the Constraints tab to force input values
Also add default values for each variable, optionally based on the minimum and maximum values of the field you try to filter (like =Min({1}Amount) and =Max({1}Amount) )
Best,
Peter
Thank you Peter,
I have put in $<=vFilterHigh and $>=vFilterLow and everything works great.
Thanks for the help!
Greetings, Janneke.
Please share the expression and details how to got the values of Min and Max and How to be enter between this range.