Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody.
For example if i have to do
COUNT DISTINCT (X)
IF STATE = 1
this in qlikview is
if(state=1,count(distinct(x)),)
How i do this with set analysis? what is the best option?
Greetings!
This will give you the result you want
count({$ <state={1}>} distinct X)
Hi there.
Try:
COUNT
(
{$<state={1}>}
DISTINCT
X
)
Kind regards,
Ernesto.
Thanks.
I've done this
Count(DISTINCT{<Condition>}X)
This will give you the result you want
count({$ <state={1}>} distinct X)
It seems the positions of the set expression and the DISTINCT clause are irrelevant. In my tests
=COUNT( DISTINCT {$<state={1}>} x ) |
is the same as:
=COUNT( {$<state={1}>} DISTINCT x ) |
Kind regards,
Ernesto.