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

Announcements
Now accepting applications for the Qlik Luminary and Partner Ambassador Programs: Apply by July 6!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

YTD Calculation

H all,

i want to calculate a YTD of year that i select.

For example if i select 2016-02 i want a sum of value of 2016-01 and 2016-02 etc...

Like field I have year_month (eg. YYYY-MM)

Can somebody help me?

Labels (1)
20 Replies
agni_gold
Specialist III
Specialist III

Somethingh like that ?

satishkurra
Specialist II
Specialist II

Apology guys. I should have thought about this before replying...

sunny_talwar
MVP
MVP

No apology needed my friend... Thats how we all learn, isn't it?

satishkurra
Specialist II
Specialist II

Hmm yes

Not applicable
Author

Hi Sunny, with the field Year_Month doesn’t work, could be this because I don’t have a date YYYY-MM-DD or I’m wronging the formula?

Help me please ☹

agni_gold
Specialist III
Specialist III

elaborate please          

sunny_talwar
MVP
MVP

What exactly are you trying to get?

Not applicable
Author

I want YTD of Prior and Current year, but with the formula =RangeSum(Before(Sum({$}Qta)), 0, ColumnNo()))

I don’t’ think it is wrong…..

sunny_talwar
MVP
MVP

This?

Capture.PNG

Current

=RangeSum(Before(Sum({$<ReportYearMonth={">=$(=YearStart(Max(ReportYearMonth)))<=$(=Max(ReportYearMonth))"}, Flag = {'CY'}>}Qta), 0, ColumnNo()))

Previous

=RangeSum(Before(Sum({$<ReportYearMonth={">=$(=YearStart(Max(ReportYearMonth)))<=$(=Max(ReportYearMonth))"}, Flag = {'PY'}>}Qta), 0, ColumnNo()))

Not applicable
Author

Hi Sunny,

now works!!!!!!! ☺ thanks thanks thank !