Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
markgraham123
Specialist
Specialist

Pick and Match

Hi,

I have a requirement which is as follows:

I have Warehouse, ID, Units

Where Warehouse comes from Table1 and ID and Units were from Table2.

When i select Warehouse from Table1, Count(Distinct(ID) from Table 2and Sum(Units) from Table2 should be displaye d in table.

=Pick(Match([W1], 'ABC'), Sum(TOTAL{<W2= {'ABC'}>} [Units]))

=Pick(Match([W1], 'ABC'), Count(Distinct{<W2= {'ABC'}>} ID))


The above coed is not giving me right answer...

Can anyone look into this.

14 Replies
swuehl
MVP
MVP

What do you expect to see?

I do see a correct value returned (1)

W1 =Pick(Match([W1], 'a')+1, Null(),Count(Distinct{<W2= {'a'}>} LBCD)) sum(Qty)
4601
a1234
b 4323
c 32
d 12
markgraham123
Specialist
Specialist
Author

Hi,

i.e. in the above report it is showing Count(Distinct(LBCD)) is 1.

I wanna see the LBCD.."4545" in the report.

swuehl
MVP
MVP

A count() will just count the field values, not showing them. Use only() or concat() instead.

And since you are using a set analysis filter like {<W2 = {'a'}>}, the returned LBCD will be 22, not 4545.

It's quite unclear what you are trying to achieve.

Maybe it's better for us to help you if you start explaining your requirements.

markgraham123
Specialist
Specialist
Author

Hi,

For cross checking purposes whether the Set analysis count i'm using working correct or not...

I wanna display the LBCD...

For eg:

he above report it is showing Count(Distinct(LBCD)) is 1.

I wanna see the LBCD..its fetching is "4545" for my own reference (not in the original report).

markgraham123
Specialist
Specialist
Author

Hi Sir,

Pls lemme know is there any option to look the fetching value.