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

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem Set Analysis

Hello

I have a problem in an expression. In only want to show the records  (=Besteknummer) where field  Status = 1 and the field "RFQ" is empty.

In my expression the set analysis is : =Count(DISTINCT{<Status={'1'},RFQ={0}>}Besteknummer)

It doesn't work.

RFQVestiging (code)BesteknummerStatus
6000132826240P57534140111
--7152513_441

Can somebody help me ?

Thanks in advance

Marc Van Rie

Labels (1)
6 Replies
tresB
Champion III
Champion III

Try:

=Count(DISTINCT{<Status={1},RFQ={''}>}Besteknummer)

Or

=Count(DISTINCT{<Status={'1'},RFQ-={'*'}>}Besteknummer)          // Note '-' sign

ashwanin
Specialist
Specialist

Try this

Count({<Status={1},RFQ={''}>}DISTINCT Besteknummer)

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Just like you cannot select null values from a list box, you cannot use set analysis to select null values. You will either need to use a count(if()) expression, set a flag in the load script for the null values or replace the null values with blank strings or a value like 'MISSING'. In the last two options, you can use set analysis to select the flag or the 'MISSING' values.

count(If()):

     =Count(If(IsNull(RFQ), DISTINCT{<Status={'1'}>} Besteknummer))

flag:

     LOAD ...

          RFQ,

          If(IsNull(RFQ), 1, 0) As RFQNull,

          ...

     =Count(DISTINCT{<Status={1},RFQNull={'1'}>}Besteknummer)

missing:

     LOAD ...

          If(IsNull(RFQ), 'MISSING', RFQ) As RFQ,

          ...

     =Count(DISTINCT{<Status={1},RFQ={'MISSING'}>}Besteknummer)

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Jonathan

You solution works. Thanks a lot.

Marc Van Rie

Not applicable
Author

Hi Jonathan

You solution works. Thanks a lot.

Marc Van Rie

Not applicable
Author

Hello

One off the solutions proposed by Jonathan Dienst and working:

Thanks a lot.

Just like you cannot select null values from a list box, you cannot use set analysis to select null values. You will either need to use a count(if()) expression, set a flag in the load script for the null values or replace the null values with blank strings or a value like 'MISSING'. In the last two options, you can use set analysis to select the flag or the 'MISSING' values.

count(If()):

=Count(If(IsNull(RFQ), DISTINCT{<Status={'1'}>} Besteknummer))

flag:

LOAD ...

RFQ,

If(IsNull(RFQ), 1, 0) As RFQNull,

...

=Count(DISTINCT{<Status={1},RFQNull={'1'}>}Besteknummer)

missing:

LOAD ...

If(IsNull(RFQ), 'MISSING', RFQ) As RFQ,

...

=Count(DISTINCT{<Status={1},RFQ={'MISSING'}>}Besteknummer)