Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
anuradhaa
Partner - Creator II
Partner - Creator II

Two distinct values in set analysis.

I want to get distinct count of below expression,

=count( {$<UNIT_SINGLE={'UNIT'}>} Distinct(DATE,UNIT_NAME) )

but that doesn't work,

I want to get distinct UNIT_NAME count. but i have to check it with the date.

i mean in the next week i can have same name.

SEE BELOW,

UNIT NAME     UNIT_SINGLE     DATE

ABC                    UNIT               2013/02/15

ABC                    UNIT               2013/02/15

CDE                    UNIT               2013/02/15

ABC                    UNIT               2013/02/25

So i want to result for FEB

NUMBER OF DISTINCT SHIPDATE,UNITS

THAT MEANS= 3

PLS HELP

THANK YOU

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Try with concatenate operator

=count( {$<UNIT_SINGLE={'UNIT'}>} DISTINCT  DATE & UNIT_NAME)

View solution in original post

5 Replies
alexandros17
Partner - Champion III
Partner - Champion III

That is not possible, the solution is to concat the fields in order to manage only one field (ex.

ABC_2013/02/15 as new field

Hope it helps

anuradhaa
Partner - Creator II
Partner - Creator II
Author

Thanks Saccone

SHIPDATE and UNIT_SINGLE  is in two tables. So pls help me

alexandros17
Partner - Champion III
Partner - Champion III

join the tables (outer join if now are associated) so all fields will be in only one table:

Tab_All:

noconcatenate

select * ... from ... table1

outer join

select * ... from ... table2

MyTable:

noconcatenate

load

     *,

     field1 & field2 as newfield

resident Tab_All;

drop table Tab_All;

Then use newfield in the count distinct

CELAMBARASAN
Partner - Champion
Partner - Champion

Try with concatenate operator

=count( {$<UNIT_SINGLE={'UNIT'}>} DISTINCT  DATE & UNIT_NAME)

anuradhaa
Partner - Creator II
Partner - Creator II
Author

Thanks All.

Thank you very much.