Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Stratify a Column

Hi all,

I have a column indicating the total sales amount and I would like to straify it and show it as seen below. Which would be the best way to go ? Any help would be appreciated

Strat IndicatorTransaction AmountTransaction Count
< 100k         (total transaction amount for this range)(number of transactions within this range)
100-200k (total transaction amount for this range)(number of transactions within this range)
200-300k  (total transaction amount for this range)(number of transactions within this range)
>300k        (total transaction amount for this range)(number of transactions within this range)

Thanks

1 Solution

Accepted Solutions
MVP
MVP

Re: Stratify a Column

with class function?

from online help

class(expression, interval [ , label [ , offset ]])

Creates a classification of expressions. The bin width is determined by the number set as interval. The result is shown as a<=x<b, where a and b are the upper and lower limits of the bin. The x can be replaced by an arbitrary string stated in label. 0 is normally the default starting point of the classification. This can be changed by adding an offset.

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'

4 Replies
Employee
Employee

Re: Stratify a Column

Can you provide some source data or qvw ?  its possible.

MVP
MVP

Re: Stratify a Column

with class function?

from online help

class(expression, interval [ , label [ , offset ]])

Creates a classification of expressions. The bin width is determined by the number set as interval. The result is shown as a<=x<b, where a and b are the upper and lower limits of the bin. The x can be replaced by an arbitrary string stated in label. 0 is normally the default starting point of the classification. This can be changed by adding an offset.

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

Re: Stratify a Column

Hi Jonathan,

The source file can be anything as long as it contains a numeric column having values. I would like to stratify that column and have a table as shown in the dashboard.

Not applicable

Re: Stratify a Column

Hi Massimo Grossi,

Thank you. The class function was what I was looking for. I figured I need to create a calculated dimension and it worked.

Community Browser