Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Talk to Experts, a LIVE Q&A Webinar. Bring your Qlik Sense Business questions on Aug. 4th. Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

What is the syntax of an expression with "if", "count distinct", comparing 2 values ?

Hi everybody,


i need to calculate a number of sales by distinct ID, comparing 2 values :
if(min(p.Contenu) <= num(p.Event),1)

Anybody could help me to use the right syntax ?

I tried many things as

count(distinct(if(min(p.Kiosque) <= num(p.Event),[Visites ID])))

Thank you for your help.

 

3 Replies
Highlighted
Specialist III
Specialist III

Re: What is the syntax of an expression with "if", "count distinct", comparing 2

TRY

IF(min(p.Kiosque) <= num(p.Event),COUNT( DISTNCT [Visites ID],0)

Channa
Highlighted
Master II
Master II

Re: What is the syntax of an expression with "if", "count distinct", comparing 2

HI

 

It completely depend upon where you are using the expression . Still you may try this

count({<[Visites ID]={"=min(p.Kiosque) <= num(p.Event)"}>}[Visites ID])

Thanks

Pradosh

Learning never stops.
Highlighted

Re: What is the syntax of an expression with "if", "count distinct", comparing 2

Perhaps this?

count(distinct if(min(p.Kiosque) <= num(p.Event),[Visites ID]))

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)