Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
rvijayanth
Creator
Creator

How to use Between function in Qliksense

I have a pivot table with distinct count of ID as a measure. I want to be able to count ID when its "Between" "From" and "To".

Whats the syntax for using between logic?

Will something like the following work?

Count({<[Year]={">$(vFrom)"} and [Year]={">=$(vTo)"}>} Distinct ID)???

1 Solution

Accepted Solutions
shraddha_g
Partner - Master III
Partner - Master III

Try:

Count({<[Year]={">$(vFrom)<=$(vTo)"}>} Distinct ID)

View solution in original post

7 Replies
shraddha_g
Partner - Master III
Partner - Master III

Try:

Count({<[Year]={">$(vFrom)<=$(vTo)"}>} Distinct ID)

rvijayanth
Creator
Creator
Author

Thank you so much

rvijayanth
Creator
Creator
Author

One more question, what if I want to show the dimension in my pivot table as years but only years between 'from' and 'to' years?

Something like this????

if([Year]={">$(vFrom) and <=$(vTo)"}), [Year])

shraddha_g
Partner - Master III
Partner - Master III

instead use set analysis in all expressions of Pivot table ({<[Year]={">$(vFrom)<=$(vTo)"}>}

and in Add Ons Section uncheck Show zero values.

It will restrict year in dimension according to values mentioned in set analysis

rvijayanth
Creator
Creator
Author

I want to use in dimension so that when users use the slider to set from and to values, the values show up as selections on the selection bar.

So please tell me if this can be used to restrict dimensions?

shraddha_g
Partner - Master III
Partner - Master III

try

if([Year]>='$(vFrom)' and [Year]<='$(vTo)', [Year])

rvijayanth
Creator
Creator
Author

Thank you so much. This is what I want although I realize i like the expression on the count is better.