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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Expression

if(DRGRSLT='Soap' ,count(distinct ID)*.35,'')

In Above expression  I am considering only "Soap" from the field Lead,

How do i write a expression  where upon i can select anything from the field ?

For exmaple :

if(Lead='*' ,count(distinct ID)*.35,'')     Which is not working ?

and also i want to condier two fields

if(Lead='Soap', andif(product='*'  ,count(distinct ID)*.35,'')

Can someone please throguth some light on this

1 Solution

Accepted Solutions
Kushal_Chawda

like this?

count(distinct {<Lead={'*'}>} ID)*0.35


or


count(distinct {<Lead={'Soap'},Product={'*'}>} ID)*0.35

View solution in original post

9 Replies
Kushal_Chawda

like this?

count(distinct {<Lead={'*'}>} ID)*0.35


or


count(distinct {<Lead={'Soap'},Product={'*'}>} ID)*0.35

sunny_talwar

I have no idea what you are trying to do here, is there a sample you can share with the expected output?

Chanty4u
MVP
MVP

is this may be

count(distinct{<lead={'*'}>}id)*0.35

?

Anonymous
Not applicable

Is their any difference b/w your expression and this?

'*' means every thing, is this really required to pass in SET?

=count(Distinct ID)*0.35

or

=count({<Lead={'Soap'}>} ID)*0.35

sunny_talwar

When you add this -> {'*'} in ignore null

Sum({<Country = {'*'}>} Sales) can be different from Sum(Sales) if there are places where Country is null.

sasiparupudi1
Master III
Master III

Try the following

count(distinct {1<lead={'*'}>}ID)*.35

Anonymous
Not applicable

Putting '*' means it will ignore null, Is it?

sunny_talwar

Yes

Anonymous
Not applicable

Okay, have not obsereved it earlier

Thanks for clarification