Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
NareshGuntur
Partner - Specialist
Partner - Specialist

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
sunny_talwar

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
sunny_talwar

Try this

Aggr(

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

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

, A)

Anil_Babu_Samineni

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'))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
NareshGuntur
Partner - Specialist
Partner - Specialist
Author

Thanks Sunny

NareshGuntur
Partner - Specialist
Partner - Specialist
Author

Thanks Anil. I tried this.