Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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

6 Replies
tresesco
MVP
MVP

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)