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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

YTD Calculation

I am counting the number of units sold per month with the formula:

sum({<MonthNum={$(=Max(MonthNum))}>}[Units Solds])

that mean if I selected several months in first chart, QlikView provides the data for the latest month and this works perfectly.

In a second chart, I'd like to display the YTD units sold and I was expecting that the following formula should do it:

sum({<MonthNum<={$(=Max(MonthNum))}>}[Units Solds])

but it is not processing. Any help is welcome.

Pierre

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

Hi Gysbert,

thanks for your quick reply. I just moved the " before the first } to get

sum({<MonthNum={"<=$(=Max(MonthNum))"}>}[Units Solds])

and it went fine. so it's a case closed.

Thanks and regards,

Pierre

View solution in original post

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try this: sum({<MonthNum={"<=$(=Max(MonthNum))"}>}[Units Solds])


talk is cheap, supply exceeds demand
er_mohit
Master II
Master II

Hi

Try this

sum({<MonthNum={'<=$(=Max(MonthNum))'}>}[Units Solds])

Not applicable
Author

Hi Gysbert,

thanks for your quick reply. I just moved the " before the first } to get

sum({<MonthNum={"<=$(=Max(MonthNum))"}>}[Units Solds])

and it went fine. so it's a case closed.

Thanks and regards,

Pierre