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: 
Not applicable

Grouping the values

Hi all,

I have a score values starting from 1,2,3,4.5,5.5.5 .....10. These all values are given by the customers for a specific product which they bought.

Now all I have to do is make group of these score values and show it in a stack chart like 0 to 7.5 should be a group1 , 7.5 to 8.5 should be group2 , 8.5 to 9.0 should be group 3 and 9.0 to 10 should be group 4.

The chart should consist Quarter as X-axis and group values should be in expression shown as stacked chart.

Can you please let me know how to create this group?

I believe i can do symmetric groups with 'Class' function . As this groups are not symmetric I am unable to use Class function.

Any Ideas would be thankful

PS:please find sample data attached

Deepak Vadithala Can you help me in this?

Thanks in advance.

Best regards,

Susvith

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Use a nested if statement in the script to create the Group field. See attached qvw


talk is cheap, supply exceeds demand

View solution in original post

7 Replies
sujeetsingh
Master III
Master III

You can create the ranges in two ways:

1) Can use nested iff to define the ranges

2) Can use class function

Examples

class( var,10 ) with var = 23 returns '20<=x<30'

class( var,5,'value' ) with var = 23 returns '20<= value <25'

class( var,10,'x',5 ) with var = 23 returns '15<=x<25'

Not applicable
Author

Hi

many solution fr that

1. you can add a colum Group in your xls file

2. you can use IF function but that means to do many If(v < 7.5,  G1,  if (v < 8.5, G2...)

3. you can create a mapping table l for every value and assign a group for each of it then use applymap('Map_table', value) as group

4. may be an other function i wouldn't know

best regards

Chris

Anonymous
Not applicable
Author

Hi,

Use the Interval Match function.


Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Use a nested if statement in the script to create the Group field. See attached qvw


talk is cheap, supply exceeds demand
Not applicable
Author

Thank You so much Gysbert , I just forgot that I can divide into groups in script level.

Add on to it , I have one more hurdle here.

For the same scenario , I should show Y-axis in percentage %.  Here the Y-axis should show 100% which means at any cost Group1+Group2+Group3+Group4=100%.

Can I show like this in QlikView?

I believe i can use AGGR fucntion here . But I am not sure can you help me?

Thanks in advance.

Best regards,

Susvith

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Change the expression to count(Visitor)/count(total <Quarter> Visitor)


talk is cheap, supply exceeds demand
IAMDV
Master II
Master II

Sorry mate. Just saw your message but Gysbert Wassenaar solved it for you.

Cheers,

DV

www.QlikShare.com