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

Creating a threshold filter for a table

I have a table that has a field on it with dollar amounts.  I would like to create a threshold filter of pre-defined values (All, 100k, 500k, 1M, etc) and when the user selects the amount, the table will filter to the items that are >= the threshold.  I cannot find any charts or controls that will do this.  I do not have the ability to install any extensions due to restrictions from the data owner.

Thanks!

1 Solution

Accepted Solutions
Evan0211
Creator
Creator
Author

After trial and error, I found out that this is a known error (https://community.qlik.com/t5/New-to-Qlik-Sense/Variable-Input-extension-Dashboard-Bundle-stopped-wo...)

What I had to do to get it working was set each of my thresholds as their own individual variables and then include the variable name in the dynamic values string.  

In the table column expression, I had to add =Sum($($(vFilter))[Total Value]) to get it to work correctly.  Thanks for all of the help, I really appreciate it. 

View solution in original post

26 Replies
jwjackso
Specialist III
Specialist III

You can use the Variable Input with Set Analysis.

Create a variable, vFilter and in the Variable Input define it as 

='~All|{<[Dollar Amount]={">100000"}>}~>100k|{<[Dollar Amount]={">500000"}>}~>500k|{<[Dollar Amount]={">1000000"}>}~1M'

Your table expression would look like

Sum($(vFilter)[Dollar Amount])

Evan0211
Creator
Creator
Author

It says Error in Expressions ')' expected

The plain text shows Sum(100000 [Dollar Amount])

jwjackso
Specialist III
Specialist III

Can you show the string that you used in the variable dynamic expression field?  Also replace the [Dollar Amount] with the real field name.

Evan0211
Creator
Creator
Author

I upped the numbers to M from K.

Variable - 

='~All|{<[Total Value]={">1000000"}>}~>1M|{<[Total Value]={">5000000"}>}~>5M|{<[Total Value]={">10000000"}>}~10M'

Expression -

Sum($(vFilter)[Total Value])

jwjackso
Specialist III
Specialist III

With the following data:

Set vFilter="";

Data:
Load * Inline [
Dept,Total Value
D0,100000
D1,1000000
D2,5000000
D3,10000000
D4,20000000
];

Using your variable string:

Capture1.PNG

The variable filter works

Capture2.PNG

Evan0211
Creator
Creator
Author

When I toggle through the buttons, the data does not limit and the column that holds the amounts all turn to "-"

jwjackso
Specialist III
Specialist III

In the expression editor for Sum($(vFilter)[Total Value]), at the bottom, how has the $(vFilter) been expanded

 

Evan0211
Creator
Creator
Author

The expression in the column of the table is: =Sum($(vFilter)[Total Value])

 

The bottom shows: =Sum([TotalValue])

 

vFilter has not been expanded on the bottom.

jwjackso
Specialist III
Specialist III

And you have selected something other than the All button?