Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional statement in Dimension

Hi All,

I want to use the belwo IF stamnt as one of the dimension along with Name in a pivot chart.

=if((Max(TOTAL <Name> Aggr(SUM(Handled),Name,Date)))<600,'0-600',if((Max(TOTAL <Name> Aggr(SUM(Handled),Name,Date)))<800,'600-800',if((Max(TOTAL <Name> Aggr(SUM(Handled),Name,Date)))<1000,'800-1000',if((Max(TOTAL <Name> Aggr(SUM(Handled),Name,Date)))<1500,'1000-1500','1500>'))))

How do i do it.

It works as an expression in a Table and i want that as dimension.

Or is it possible  to add it as Variable and then in to dimension

15 Replies
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

You may want to read my description of Aggr from the 31st of last month on this thread:

Aggr function on avg

Not applicable
Author

I am getting the Avg & MAx based on the aggr function same as your example in table.

But how do i bucket them and show it in Graph as dimension with count of Names under each bucket

Not applicable
Author

Yes you are right there was a typo and it is working fine.

But instead of calls as it is grouping in predefined intervals is there a possibility of getting the bucket predifined as using IF condition in dimension

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

To do this you will need to use your original IF statement, and nest Aggrs

accordingly.

Not applicable
Author

But I am unable to add the below Script in teh dimension of Grpah

if((Avg(TOTAL <Name> Aggr(SUM(Handled),Name,Date)))<400,'0-400',if((Avg(TOTAL <Name> Aggr(SUM(Handled),Name,Date)))<800,'400-800',if((Avg(TOTAL <Name> Aggr(SUM(Handled),Name,Date)))<1000,'800-1000',if((Avg(TOTAL <Name> Aggr(SUM(Handled),Name,Date)))<1500,'1000-1500','1500>'))))

It says Error in Calcualtion

Not applicable
Author

Got It Thanks