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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

YTD(Year to date)

Hi All,

I have Ratio say sum(amount_paid)/sum(confirmed_policy_premium) and Dimension as a Year.

I want to the ratio for all the years. This works fine.

But i have a scenario where if Current month is September then Current Years will be calculated from January to September and other Previous years from January to December.

I want other Years to be calculated from January to September.

How to achieve this.

Please help me with this. I don't have QVW to attach.

Thanks & regards,

Keerthi

Labels (1)
16 Replies
Not applicable
Author

Thanks a lot henric

If i select any year say 2012 then i will get for the complete year right ??

MK_QSL
MVP
MVP

Genius...!!!

I was also searching for the short and easy method...

bernice_gonzale
Partner - Contributor II
Partner - Contributor II

Is this working for you?

What happens when you select a year, i.e. 2013?

vikasmahajan
MVP
MVP

How to calculate previous year ytd same period last year ytd?

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
hic
Former Employee
Former Employee

Take a look at Year-over-Year Comparisons. The field IsInYTD can be used for any year, not just current year.

HIC

bernice_gonzale
Partner - Contributor II
Partner - Contributor II

This is my project and how I resolved it.

1.- I needed in a Pivot table to have these columns: Actual (current months selection) , LYM, CYTD, LYTD

PIVOT.png

2.-My Measures or calculation are row.

3.- The user should be able to select any year of information and Months. That mean, Current Year can be change to be 2017 or 2016, in consequences the rest of the columns should adjust.

Solutions:

For 1: I create an inline table. With the values I need in my columns.

trend.png

For 2: In my measures, I added the set analysis that makes the calculation based on a column. Like a Case scenario. I had to use CalendarMonth_Number, because using AddYears(( TransDate) ,-1) was not working for me.

measures.png

For 3: I'm already using Dimensions as filters.

Year.png

StacyCui
Creator
Creator

Hi, As you mentioned about YTD, I met an issue recently. In my business scope, we need put 'YTD' and Period in a filter for selecting.  I created a master calendar that set today as 'YTD'. But when I selected 'YTD' , if there is no order today, that causes other filter in gray.  In other words, 'YTD' is not a period time, just only one day. If that function could solve it? I post this issue, could you please help out with it? Thank you so much.