Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

YTD calculation

Hi,

I have only year and month fields. and on selection of year and month, it should give me the addition of  consecutive months (january onwards, upto selected month/year)

For ex, on selecting 2014 March, i want sum of January2014 + february 2014 + march 2014 value.

How can it be done

Thanks.

23 Replies
senpradip007
Specialist III
Specialist III

Try like:

Sum({<Year={$(=Max(Year))}, Month={'<=$(=Max(Month))'}>} YourField)

Not applicable
Author

thanks, i have written the same expression. but it gives me only selected month/year value. and doesnt take the previous years in calculation.

PrashantSangle

Hi,

Try this,

Sum({<Year={"$(=Max(Year))"}, Month={"<=$(=Max(Month))"}>} YourField)

If possible can share your sample apps

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
tresesco
MVP
MVP

Hi,

This  sort of analysis majorly depends on data type(how you calculate them in the script...); specially date formats. Hence, request you to create a sample qvw and share.

ashfaq_haseeb
Champion III
Champion III

Hi,

Check this

YTQ, QTD, MTD and WTD

Regards

ASHFAQ

Not applicable
Author

how do  i post the qvw. i dont find any option to post it.

senpradip007
Specialist III
Specialist III

Click on Reply link, then click Use advanced editor and attach your sample qvw.

Not applicable
Author

i am using google chrome and find no option of advanced editor

senpradip007
Specialist III
Specialist III

I'm also using chrome as well. First click Reply link, then you will find Use advanced editor link.