Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
imoratal
Creator
Creator

EMPLEO DE DISTINCT

Hola quiero sumarlas ventas de todos los comerciales excepto para 2.... He mirado en la ayuda pero no pone nada de expresiones con distinct...

Sum (IF (Comercial distinct 'X' and Comercial distinct 'Y',Importe))

La expresió no está bien porque no sé emplear el distinct, y es en lo que necesito ayuda. Gracias....

1 Solution

Accepted Solutions
RicardoRamos
Employee
Employee

You can use the set analysis

sum({<Comercial-={'X', 'Y'}>}Importe)

Where the "Minus Equal" stands for everything except the list with the X and Y.

View solution in original post

8 Replies
RicardoRamos
Employee
Employee

You can use the set analysis

sum({<Comercial-={'X', 'Y'}>}Importe)

Where the "Minus Equal" stands for everything except the list with the X and Y.

imoratal
Creator
Creator
Author

Hola Ricardo me da error en la expresión....

RicardoRamos
Employee
Employee

The check syntax gives error with "-=" but should work. Check if the names of the fields are ok.

imoratal
Creator
Creator
Author

Estoy intentando hacer una suma de los importes menos el valor de un comercial y también me da error, empleo

Sum(<{comercial-='x'}> Importe)

También he puesto:

Sum({}<{comercial-='x'}>) importe)

Salen los dos con error....

RicardoRamos
Employee
Employee

Please note the diference:

Sum(<{comercial-='x'}>Importe)

to the right one:

Sum({<comercial-={'x'}>}Importe)

Its {< and not <{

And you must have {} around the list of possible values.

You can search for Set Analysis in the User Manual and you have a lot of exemples there.

imoratal
Creator
Creator
Author

Ok Ricardo, he conseguido obtener mediante Sum({<Comercial-='x'>}Importe) el mismo gráfico que para todos, no me quita el valor del comercial x, es como sino hiciera nada....

RicardoRamos
Employee
Employee

Hi,

once again, pay atention to the sintax:

Sum({<Comercial-={'x'}>}Importe)

imoratal
Creator
Creator
Author

Muchas gracias Ricardo, sale bien  perdona por molestarte. Un saludo.