Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
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

Labels (1)
3 Replies
sunny_talwar

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?

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
vinieme12
Champion III
Champion III

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

How to use - Master-Calendar and Date-Values

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.