Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikhans
Creator
Creator

flag customer with billing > 1000

Hi all,

my upload file contains customer number, invoice number, Invoice amount.

I want to mark/flag customers with revenue of 1.000 and higher.

I would like to so in the script, in order to use it as a selection criterium. 

How to do this?

Labels (3)
1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

LOAD
...
If(Revenue > 1000, 1, 0) AS RevenueFlag
...
;
SQL SELECT
...

View solution in original post

4 Replies
Miguel_Angel_Baeyens

LOAD
...
If(Revenue > 1000, 1, 0) AS RevenueFlag
...
;
SQL SELECT
...
qlikhans
Creator
Creator
Author

Hi Miguel,

thank you for your fast reply. I tried something similar: if(sum(Umsatz)>1000,1,0) as. Any idea why the "sum" is not accepted by the script?

sunny_talwar

Were you using Group By statement in the load statement for the table where you used Sum? Aggregate functions like Sum, Avg, Concat, Min, Max need to have group by statement

Load Customer, if(sum(Umsatz)>1000,1,0) as Flag
Resident ...
Group By Customer;

 

qlikhans
Creator
Creator
Author

Hi Miguel

thank you for the solution. 

 

BR

Hans