Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Neha7
Contributor II
Contributor II

Filtering Table data based on Range Slider

Hello,

I am new to Qliksense platform and have just began creating an app.

I have a table with Columns like: City, Year, Month, ProductID, StoreID,Price, Quantiy, where productID is a number like 0,1,2,...6000.

I have to create a slider(s) to select Minimum ProductID and Maximum ProductID based on which the rows in the table visual should get filtered.

Currently, using single or multiple slicer to select minimum and maximum value would work for my use case.

I tried exploring the forums as well as using variable input visualization for the purpose but couldn't create a reliable solution.

I would appreciate any help with the case.

Thank you.

Labels (1)
4 Replies
qv_testing
Specialist II
Specialist II

Try this..

Create two variables

vMinProduct = Min(ProductID)

vMaxProduct = Max(ProductID)

Expression: =SUM({<ProductID={">=$(vMinProduct)<=$(vMaxProduct)"}>}Sales)

LRuCelver
Partner - Creator III
Partner - Creator III

Final result using 2 variables and a simple expression for the dimension:

LRuCelver_0-1707289613276.png

 

I've created 2 variables: vMinProductID and vMaxProductID.

The sliders for the variables are set up from 0 to 6000. You can adjust the values dynamically if you want to. The input boxed are used for a more precise input.

For the dimension I've used this expression:

=Aggr(If(ProductID >= vMinProductID and ProductID <= vMaxProductID, ProductID), ProductID)

Make sure to disable the checkbox "Include null values".

LRuCelver_3-1707289898652.png

 

Filtering the dimension in the table will filter the ProductID field.

Neha7
Contributor II
Contributor II
Author

Hello,

Thank you for your suggestion.

 

I tried implementing similar expression but it can't handle the case when no value is provided as input in the minimum or maximum limit box/slider. 

I did set the values as 0, 10000 while defining the variables but it doesn't helps.

Expression: 

=aggr(
if(
        ATA>= if(LEN($(vProdIdMinLimit))<1,0,$(vProdIdMinLimit))
            and
            ATA<= if(LEN($(vProdIdMaxLimit))<1,6650,$(vProdIdMaxLimit))
            ,
 
ProductID)
,ProductID)

 

I also tested using Isnull function.

Neha7
Contributor II
Contributor II
Author

Hello,

Thank you for your advise.

I tried implementing similar expression but it couldn't handle the case when no value is provided as input in the minimum or maximum limit box/slider. 

I did set the values as 0, 10000 while defining the variables but it doesn't helps.

Expression: 

=aggr(
if(
        ATA>= if(LEN($(vProdIdMinLimit))<1,0,$(vProdIdMinLimit))
            and
            ATA<= if(LEN($(vProdIdMaxLimit))<1,6650,$(vProdIdMaxLimit))
            ,
ProductID)
,ProductID)

 

I would appreciate any further suggestions.