Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

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.
d_prashanthredd
Contributor III

Define a range on Axes

Hi Experts,

I have a requirement to build a bar chart or any.

Requirement: Define a range on x-axis i.e. sum(value) for 0-199, 200-399, 400-599, 600-799, 800+

And that should be in an expression rather than in a script.

Note: I have fixed ranges.

Please find the attached qvd and the data is sample.

1 Solution

Accepted Solutions

Re: Define a range on Axes

Hi,

You should use expression like below.

=Aggr(if(sum(Value) >= 0 and sum(Value) < 200, '0-200',

if(sum(Value) >= 200 and sum(Value) < 400, '200-400',

if(sum(Value) >= 400 and sum(Value) < 600, '400-600',

if(sum(Value) >= 600 and sum(Value) < 800, '600-800', '800+')

)

)

),Field,SubField)

Regards,

Kaushik Solanki

2 Replies

Re: Define a range on Axes

Hi,

You should use expression like below.

=Aggr(if(sum(Value) >= 0 and sum(Value) < 200, '0-200',

if(sum(Value) >= 200 and sum(Value) < 400, '200-400',

if(sum(Value) >= 400 and sum(Value) < 600, '400-600',

if(sum(Value) >= 600 and sum(Value) < 800, '600-800', '800+')

)

)

),Field,SubField)

Regards,

Kaushik Solanki

d_prashanthredd
Contributor III

Re: Define a range on Axes

Hi Kaushik.. Its working fine.

I missed aggr function.. Thanks a lot.

Community Browser