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: 
javier_florian
Creator III
Creator III

Issue with a set expression into a If function

Hi Everyone,

Anyone knows why the second expression doesn't work? The app have a filter in front-user to select monetary values or quantity and we show a graph with the follow expressions in the last two months:

Values: =Sum({<Mes={">=$(=Num(Max(Mes))-1)<=$(=Num(Max(Mes)))"}>} Emisiones.ValorPrimaNeta)/Millones

Quantity: =If(Productos.Emite_doble_certificado='Si', Count({<Mes={">=$(=Num(Max(Mes))-1)<=$(=Num(Max(Mes)))"}>} Distinct Emisiones.Certificado)/2, Count({<Mes={">=$(=Num(Max(Mes))-1)<=$(=Num(Max(Mes)))"}>} Distinct Emisiones.Certificado))

With values I don't have any problem... but with quantity @#!"!!

Thanks in advanced.

- Javier Florián

2 Replies
Anonymous
Not applicable

Javier,

I don't see any problems with the expression itself, except I'd write it shorter:

Count({<Mes={">=$(=Num(Max(Mes))-1)<=$(=Num(Max(Mes)))"}>} Distinct Emisiones.Certificado)

/

If(Productos.Emite_doble_certificado='Si', 2, 1)

To make sure, try only this part, see if it works

Count({<Mes={">=$(=Num(Max(Mes))-1)<=$(=Num(Max(Mes)))"}>} Distinct Emisiones.Certificado)

Maybe the problem is with the data, not with expression(?)

Regards,

Michael

javier_florian
Creator III
Creator III
Author

Hi Michael,

Thanks for your support!!