Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Not applicable

Problems with YTD expression

Morning,

I have some problems with an expression.

Count({$<Año={$(=Max(Año))},Fecha={<=$(=max(Fecha))}>}KEYPED)

Im trying to calculate the YTD (Year to date) number of orders.

Thank you in advance.

Manuel Coterillo

Tags (2)
3 Replies
MVP
MVP

Re: Problems with YTD expression

What is the issue you are running into? Have you checked Fecha is dual field where you can find its Max and also can have Less than equal to (<=) check?

Re: Problems with YTD expression

Hola,

Si usted está tratando de conseguir este año que va del año y si su ejercicio se inicia a partir de enero Mes entonces todo lo que necesita hacer es.

Count ({$ <Año = {$ (= Max (OAN))}>} KEYPED)

Si el mes comienza a partir de abril, entonces debería probar esto.

Count ({$ <Fecha = { "> = $ (= Yearstart (Max (Fecha), 0,4))"}>} KEYPED)

Para obtener más información sobre dicho cálculo echar un vistazo a el siguiente enlace.

https://community.qlik.com/docs/DOC-9162

Saludos,

Kaushik Solanki

vinieme12
Esteemed Contributor II

Re: Problems with YTD expression

I would suggest using flags with a master calendar to avoid the hassle altogether

How to use - Master-Calendar and Date-Values