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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Set Analysis

HI All please find the below set analysis code and please let me know if it is correct

1. count(DISTINCT {$<Name={'Rexona',}>}%Product)   = Should give me the distinct count of Product only for rexona ,

2.count(DISTINCT {$<DRGRSLT={'Rexona','Lux'}>}%IncidentKey)   = should give me the  disticnt count of Rexona plus Lux

Labels (1)
1 Solution

Accepted Solutions
avinashelite
MVP
MVP

yes its correct ...

//one extra comma(,) not required

count(DISTINCT {$<Name={'Rexona'}>}%Product)   = Should give me the distinct count of Product only for rexona ,

View solution in original post

5 Replies
avinashelite
MVP
MVP

yes its correct ...

//one extra comma(,) not required

count(DISTINCT {$<Name={'Rexona'}>}%Product)   = Should give me the distinct count of Product only for rexona ,

alexandros17
Partner - Champion III
Partner - Champion III

Comma must be deleted ...

from

count(DISTINCT {$<Name={'Rexona',}>}%Product)

to

count(DISTINCT {$<Name={'Rexona'}>}%Product)

kaushiknsolanki
MVP
MVP

count(DISTINCT {$<Name={'Rexona',}>}%Product)


You have extra , here.... remove it..


Correct.

count(DISTINCT {$<Name={'Rexona'}>}%Product)


Second one is right.


Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
sunny_talwar
MVP
MVP

1st looks right, but just remove the comma after 'Rexona'

Count(DISTINCT {$<Name={'Rexona'}>} [%Product])


2nd one is using DRGRSLT and 1st expression using Name. Should both of them be using the same field name?

Count(DISTINCT {$<DRGRSLT={'Rexona', 'Lux'}>} [%IncidentKey])

Digvijay_Singh
MVP
MVP

This below -

{'Rexona','Lux'}

is interpreted as Rexona OR Lux so both will be considered.