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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Flag

Hi ALl,

Can anyone  explain what doe flag means " what do we mean by create a flag in qlikview ?

Thanks in advance

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Assume, You have null values and few data sets with you

Load * Inline [

Name, Value

-, 10

A, 20

B, 30

];

From here if we create flag over here

Load *,

If(Name = '-', 1, 0) as Flag

Resident Directory;

Then use in set analysis with null values

Sum({<Flag = {'1'}>}Value) // It returns only Null values of Value.

Sum({<Flag = {'0'}>}Value) // It returns without Null values of Value.

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

View solution in original post

3 Replies
Anil_Babu_Samineni

Assume, You have null values and few data sets with you

Load * Inline [

Name, Value

-, 10

A, 20

B, 30

];

From here if we create flag over here

Load *,

If(Name = '-', 1, 0) as Flag

Resident Directory;

Then use in set analysis with null values

Sum({<Flag = {'1'}>}Value) // It returns only Null values of Value.

Sum({<Flag = {'0'}>}Value) // It returns without Null values of Value.

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
Not applicable

Hi John,

Flag is a new derived field like below

load

product,

sales,

'jan' as flag

from .........xl;

flag is a column here u can identify the month in the flag

beck_bakytbek
Master
Master

Hi John,

to issue: flags, if you are using set expressions, they tend to become overly complex when they are too many comparison sets and conditions put in place,

In order to reduce the complexity, one can make use of the flags created in the script in set analysis expressions.

The flags can be set up to be simple binary value, 0 and 1.

Use of flags optimizes the performance of fronted calculations.

The above examples are perfect examples to understand this issue.

i hope that helps

beck