Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
Partner
Partner

Expression as a dimension

I have a table

ASum(C)
a110
a215
a320
a425
a530
a635

I need a dimension, something similar to class function

if(Sum(Aggr(Sum(C),A))>=10 and Sum(Aggr(Sum(C),A))<20,'Low',

if(Sum(Aggr(Sum(C),A))>=20 and Sum(Aggr(Sum(C),A))<30,'Medium','High'))


So, I want Low, Medium, High as Dimension values and then want some expressions to be aggregated based on the calculated dimension.



Thanks

Naresh

1 Solution

Accepted Solutions

Re: Expression as a dimension

Try this

Aggr(

If(Sum(C) >= 10 and Sum(C) < 20, 'Low',

If(Sum(C) >= 20 and Sum(C) < 30, 'Medium', 'High'))

, A)

View solution in original post

4 Replies

Re: Expression as a dimension

Try this

Aggr(

If(Sum(C) >= 10 and Sum(C) < 20, 'Low',

If(Sum(C) >= 20 and Sum(C) < 30, 'Medium', 'High'))

, A)

View solution in original post

Re: Expression as a dimension

Will you able to create calc. dim like below?

=if([Sum(C)]>=10 and [Sum(C)]<20,'Low',if([Sum(C)]>=20 and [Sum(C)]<30,'Medium','High'))

Or

=if(Aggr(Sum([Sum(C)]),A)>=10 and Aggr(Sum([Sum(C)]),A)<20,'Low',if(Aggr(Sum([Sum(C)]),A)>=20 and Aggr(Sum([Sum(C)]),A)<30,'Medium','High'))

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Partner
Partner

Re: Expression as a dimension

Thanks Sunny

Partner
Partner

Re: Expression as a dimension

Thanks Anil. I tried this.