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

My slider's max value is (sometimes) exclusive

I want to be able to switch my date handling logic between two modes, so I created a slider with a min value of zero, a max value of one, and static step of one.  Result: users can select either zero or one, no more no less.  I use the related variable in my group logic, and all is grand.

Next I wanted to switch between three different methods of handling dates, so I updated my group and increased the max value of my slider to two.  Should work, no?  No.  My slider does indeed have three valid positions, but they represent 0, 1, and 1!

I can set the max value to three, and the slider works as expected, accepting positions 0, 1, 2, and 3.  If I set the max value to four, the positions allowed are 0, 1, 2, 3, and 3.  Alternatively, if I set the static step to 0.5, the accepted positions are 0, 0.5, 1.0, 1.5, and 1.5.

This looks like some kind of rounding error: when I set the max value to two and drag the slider all the way to the right, the slider is storing the value 1.9999-something, which QlikView is rounding down to 1.0 rather than to 2.0.  The question is, what's the workaround?

I can get it working temporarily by setting the max value to something just above two, like 2.001, in which case the accepted positions become 0, 1, 2, and 2.001.  If I then scroll to 2, I can set max value back to 2, and the slider will work correctly, allowing selection of 0, 1, or 2.  However, this is temporary: if I close and reopen the file, the value list reverts to 0, 1, 2.

Using the range { 1, 2, 3 } does not work any better than { 0, 1, 2 }: it seems that the slider has a problem with a range of 2.0 (or 4.0), not with the max value per se.

Has anyone else seen this problem?  Is there a fix?

1 Reply
Not applicable
Author

Oh yeah: I'm using QlikView 11.20.12129.0 SR4 64-bit.  Interestingly, it works fine in the AccessPoint; it's just a problem for the desktop client.