Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
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

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

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