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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
SI_NY02
Contributor III
Contributor III

Grouping Dimensions

I have a dimension of HH Income ranges that I want to re-group to fewer ranges.

Example:

Group Ranges $0-9,999, $10,000-$14,999, $15,000-19,999, $20,000-24,999 to a new range of $0-24,999

What is the best way to do this?

 

Labels (1)
4 Replies
vinieme12
Champion III
Champion III

it would be simpler to create the groupings based on the actual  field that as Income values, if you have that in your dataset

 

if(Income<25000,'0-24999'

,if(Income<50000,'25000-49999'  ___ and so on

 

with a Range text field it would be like this

if(num#(subfield(Range,'-',2),'$##,###')<25000,'0-24999'

,if(num#(subfield(Range,'-',2),'$##,###')<50000,'25000-49999'

,if(num#(subfield(Range,'-',2),'$##,###')<100000,'50000-99999'   and so on

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
SI_NY02
Contributor III
Contributor III
Author

Thanks everyone.  Unfortunately, the data is set up as ranges so the two above solutions won't work.  My work around is to create a linked 2 field table with the current breakouts and the consolidated one, which does seem to work.  But I'm sure there are better ways to do this.

vinieme12
Champion III
Champion III

Can you post some sample data?

The expression for splitting text values should surely work if the example values you posted are correct 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.