Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If relations - Put labells on orders

Hi,

I am working on a report where I would like to add a column saying that if an order is less than 100 EUR it should be labelled "Small", if it's between 101 EUR and 499 EUR it should be labelled "Medium" and if it's 500 EUR or more it should be labelled "Large". Do you have any suggestion on how I should write the formula?

IF

(((Sum(Sales))) < 100, 'Small' , 'Large')

(((Sum(Sales))) < 100, 'Small' , 'Large')

(((Sum(Sales))) < 100, 'Small' , 'Large')

worked when I just wanted to have two labells but I only get zeros in the report when trying to input a third range.





/Maria



2 Replies
Not applicable
Author

Hi,

Try this and see. Hope it will work for you.....

if(sum(sales)<=100,'small',if(sum(sales)>100 and sum(sales)<500,'medium',if(sum(sales)>=500,'large')))

Regards,

Nilupa

Miguel_Angel_Baeyens

Even shorter (but untested) and probably faster if the amount of data is huge as it sums twice

If(Sum(Sales) <= 100, 'Small', If(Sum(Sales) < 500, 'Medium', 'Large'))


Regards