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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewaf
Creator
Creator

How to select

Hi,

i have a formula that basically assign a flag (1) or (0) based on the fact that a customer is selling more than 10K or less than 10K. (as formula below).


There's a way to select only customers having Flag 1 or 0 based on the formula below?

Thank you

=if(

(if(vExcludeInstrumentSales,sum({<Area-={'Area-not-available'}>}ExtendedUSD),Sum({<Area-={'Area-not-available'},Item_Category={$(vNoInstruments)}>}ExtendedUSD))/1000)>10 and

(if(vExcludeInstrumentSales,sum({<Year = {"$(=Max(Year)-1)"},Area-={'Area-not-available'}>}ExtendedUSD),Sum({<Year = {"$(=Ma(Year)-1)"},Area-={'Area-not-available'},Item_Category={$(vNoInstruments)}>}ExtendedUSD))/1000)=0,

1,0)x

2 Replies
YoussefBelloum
Champion
Champion

Hi,

basically you can do it with the IF: if( match(Flag,1,0), YOUR EXPRESSION...)

or add it in the set analysis ==> Flag={1,0}

rubenmarin

Hi Antonio,

Best approach will be to create a field in script where users can select.

To use without creating a field you can use aggr() to assign a value for each customer:

Aggr(

if(Flag=1,'> 10K', '< 10K')

, Customer)