Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
bauddin
Contributor II
Contributor II

Select only a range of values from a Field as a bar chart dimension

I have a field named as days to arrival which consists values between 0-170. I would like to make  a bar chart with days to arrival as a dimension but only for 0- 68 days.Is there any ways to set this range ?

Labels (1)
4 Replies
GaryGiles
Specialist
Specialist

To use as a dimension, you could use the aggr() function, like this:

aggr(Only({$<[Days to Arrival]={">=0<=68"}>} [Days to Arrival]), [Days to Arrival])

bauddin
Contributor II
Contributor II
Author

That works .Thanks a lot for your quick answer

 Could you please tell  can I extend its use for class groups which i created using "class(daystoarrival,2)" .Some of them are as follows:

bauddin_0-1621596822256.png

 

GaryGiles
Specialist
Specialist

Yes, you can enclose the aggr() function in a class() function, like this:

=class(aggr(Only({$<[Days to Arrival]={">=0<=68"}>} [Days to Arrival]), [Days to Arrival]),2)

bauddin
Contributor II
Contributor II
Author

Thank you so much!