Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
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

Tags (1)
1 Solution

Accepted Solutions
neetha_p
Honored Contributor

Re: Creation of flags

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
ink12345
Contributor

Re: Creation of flags

Can you please share a sample data?

priyarane
Valued Contributor

Re: Creation of flags

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

Not applicable

Re: Creation of flags

thanks for Response,

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

priyarane
Valued Contributor

Re: Creation of flags

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

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

Re: Creation of flags

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

Re: Creation of flags

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

Re: Creation of flags

Sunny am attached my sample Qvd. in new Thread.

neetha_p
Honored Contributor

Re: Creation of flags

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