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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I do an If?

Hi all!

I trying to do an If like this:

=If(ALMACEN2='TOMÉ',SUM(VENTA)/COUNT(DISTINCT [FECHA FACTURA])/1000,)

But it doesn't work,  what I want to do is to graph only the [Punto de Venta] called "TOMÉ"

Can anybody help me with this please!

Thanks in advance...

1 Solution

Accepted Solutions
sunny_talwar

See if this works:

=SUM({<ALMACEN2 = {'TOMÉ'}>}VENTA)/COUNT(DISTINCT {<ALMACEN2 = {'TOMÉ'}>} [FECHA FACTURA])/1000

View solution in original post

5 Replies
sunny_talwar

See if this works:

=SUM({<ALMACEN2 = {'TOMÉ'}>}VENTA)/COUNT(DISTINCT {<ALMACEN2 = {'TOMÉ'}>} [FECHA FACTURA])/1000

Not applicable
Author

Thank you very much Sunny T,  it work perfectly... So I made a little change but the script also work:

 

=SUM({<ALMACEN2 = {'TOMÉ'}>}VENTA)/COUNT(DISTINCT [FECHA FACTURA])/1000

I think this is the if " ({<ALMACEN2 = {'TOMÉ'}>}"... So is not necessary write it twice...

Thanks again it was very useful to me...

sunny_talwar

Great, I am glad you were able to figure it out... Please close the thread since you have got what you were looking for.

Best,

Sunny

Not applicable
Author

Sorry I don't know how can I close this discussion... Could you tell me?... I'm new here...

Anonymous
Not applicable
Author

Thanks for asking Fernando,

On the left side of each response you can mark either a helpful or correct answer. When you mark an answer correct it closes the thread and also grants points to the person who helped solve your query.

Best Regards and Welcome to Qlik Community!!

Sara