Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creation of flags

Hi,

How to create flags in qlikview .

eg: in sales data  some customers Buy's  product. i need to create a table. that  if customer buys it shows '1' if not flag should shoes  '0'

setanalysis;

i want data of customers  who flag =1 in 2010,2011 and count

Kindly Please provide any sample application on this..Experts

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

Please Try:

Script:

IF(Len(Trim(Sales)) = 0 ,0, 1) as Flag


UI:


Count({<flag ={'1'}, year ={2010,2011}>}Customers)

View solution in original post

8 Replies
Anonymous
Not applicable
Author

Can you please share a sample data?

priyarane
Specialist
Specialist

if(sales > 0 ,1, 0) as Flag

Not applicable
Author

thanks for Response,

but how to create a flags. and how to use them .

priyarane
Specialist
Specialist

only({<flag ={'1'}, year ={2010}>}customers)

Count({<flag ={'1'}, year ={2010}>}customers)

sunny_talwar

I think it would be better if you can share your data because the data will dictate how the flag can be created and used. May be share few lines of data in an Excel file or may be even a qvw file with data loaded in it.

Not applicable
Author

Following the above example, once you have a flag, you can put it as a column in a pivot table and using the image feature you can put some representative icon over the column. Sorting the column in the way that you need, you will get a easy and quickly way to see what you are looking for.

Not applicable
Author

Sunny am attached my sample Qvd. in new Thread.

Anonymous
Not applicable
Author

Hi,

Please Try:

Script:

IF(Len(Trim(Sales)) = 0 ,0, 1) as Flag


UI:


Count({<flag ={'1'}, year ={2010,2011}>}Customers)