Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
jerryr125
New Contributor III

Filtering on a range

Question about filters:

Can you create a filter that will filter on the data based upon a measurement falling in a range ?

That is - say you want to have a filter for the value amount - the filter would have the following to select from :

 Under 2

2+ - 3

3+ to 5

5+ to 10

Over 10

 

and if the user selects 2+ - 3 , the sheet will filter and only show results were the Amount measure is between 2 and 3.

 

thoughts ? Jerry

 

 

Labels (1)
2 Replies
vaisgaard
New Contributor II

Re: Filtering on a range

Hi Jerry,

Normally I would create the measure/calculation in the loadscript. Then it becomes a dimension you can filter on.

If your calculation is a dimension, then you can use ranges in the filter on tables. If you want to have a filterpane instead, then I would create that in the loadscript as well. You can do that by using if() statements.

I hope that helps.

Best regards

Michael

Partner
Partner

Re: Filtering on a range

Hi Jerry,

See this example:

 

Table:
Load * Inline [
Value
1
2
3
4
5
6
7
8
9
10
11
12
];

FinalTable:
Load
  Value,
  IF(Value >= 0 and Value <= 3, '0-3',
    IF(Value >= 4 and Value <= 10, '4-10',
       IF(Value >= 11, '11+','<0'))) as Category
Resident Table;

Drop table Table;

 

Jordy

Climber

Work smarter, not harder