Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
NenadV
Creator II
Creator II

In QlikView how to classify age in groups of 10 starting with 15?

Hi,

I would like to group employee age in groups of 10 starting at 15.

This calculated dimension: 

=dual(replace(class(Age, 10), '<= x <','-'),class(Age, 10))

gives this:

Aging result2025-08-13_10-41-51.jpg

thank you

Labels (3)
2 Solutions

Accepted Solutions
PrashantSangle

try this

class(Age,10,'-',5 )

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

4 Replies
PrashantSangle

try this

class(Age,10,'-',5 )

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
NenadV
Creator II
Creator II
Author

Thanks Prashant.

 

marcus_sommer

In addition to the suggestion from @PrashantSangle the third parameter replaced only the x but not the <= > chars. Therefore the replace within a dual() is further needed if a different view is wanted. But the fourth parameter is useful to adjust the bucket-size to a fix offset-value.

On top of it you may wrap the Age with a rangemax() and/or rangemin() if the start- and end-bucket should be limited to a certain number of buckets and may in the end looking like:

= dual(replace(class(rangemin(66, rangemax(15, Age)),10,'',5), ' <= < ', ' - '),
                        class(rangemin(66, rangemax(15, Age)),10,'',5))

NenadV
Creator II
Creator II
Author

Thank you Marcus.

 

Replacing '-' with 'X' in Prashant's solution is fine with me.