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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
ecolomer
Master II
Master II

Problem with Aggr & Set Analysis

Hi,

I need to obtain in a  table with (Ventas) Sales >0 in the Actual Year and the same for the last Year and but my expression don't work.

  • count({<Año={$(AñoActual)}, Mes={'<=$(MesActual)'}>} distinct Cliente)
  • Sum(if(Aggr(Sum({<Año={$(AñoActual)}, Mes={'<=$(MesActual)'}>} imVentaTAM), Cliente)>0, 1,0) )

p_ctes.pngthe number of Customer

Labels (1)
1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Hi Enrique,

In Your Doc I tried

count({<Año={$(AñoActual)}, Mes={'<=$(MesActual)'},Cliente={"=Sum({<Año={$(AñoActual)}, Mes={'<=$(MesActual)'}>} imVentaTAM) > 0"}>} distinct Cliente)

The result is 111

Regards,

Antonio

View solution in original post

6 Replies
sunny_talwar
MVP
MVP

What are the expected numbers here?

ecolomer
Master II
Master II
Author

Hi Sunny T,

Attached I send a excel file with the list customers and marked error in column

ecolomer
Master II
Master II
Author

For Nº Clientes 2016 = 111 (no 120) and for Nº Clientes 2015 = 119 (is OK)p_prueba.png

This data por a selected line (ALB  ALBACETE

Attached you have an excel with detailed data

Anil_Babu_Samineni
MVP
MVP

Can you please post sample Application?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
ecolomer
Master II
Master II
Author

In the original post is a qv file

antoniotiman
Master III
Master III

Hi Enrique,

In Your Doc I tried

count({<Año={$(AñoActual)}, Mes={'<=$(MesActual)'},Cliente={"=Sum({<Año={$(AñoActual)}, Mes={'<=$(MesActual)'}>} imVentaTAM) > 0"}>} distinct Cliente)

The result is 111

Regards,

Antonio