Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
nareshthavidishetty
Creator III
Creator III

YTD Calculation from MTD

Hi,

We have an report which captures the data from day 1 of the month by accumulating the data to month end (MTD data capture) .

Now we have planned to have an YTD report.

If we directly give the date range means it's not correct because its MTD.

So to get YTD numbers we have planned to capture only month end value.

Logic: sum(Dollars)

Year start: Jan-2016

Please let me know how to get YTD by including only month end dollar value of every month.

Thanks..

9 Replies
MK_QSL
MVP
MVP

What are the dimensions you have in your calendar ?

I mean Date, Month, Year, YearMonth ?

Where you want this output? Chart/Table, Text box?

Anonymous
Not applicable

Hi,

Can you share your date format(MTD or other)? so we can undrestant that what function we can apply for calculating YTD.

Thanks,

nareshthavidishetty
Creator III
Creator III
Author

Hi Manish,

We are having date and table required is pivot.

Hi Pooja,

'MM/DD/YYYY' format.

Thanks..

MK_QSL
MVP
MVP

Please read my query and provide more information.

Anonymous
Not applicable

hi,

as of your requirement....

you can use....

dimension as MonthEnd(your date field)  and

expression as sum(Dollars)

by this you get...month end wise sum of dollars in every year....based on your data

then you have to filter only this year(2016) month ends.

MK9885
Master II
Master II

MonthEnd(YourDateField) as MonthEnd <<< write this in Master Calendar

And in front end, use MonthEnd as Dim

Sum(Dollar) as expression.

Anonymous
Not applicable

Yes,

You can also calculate in script level

MonthEnd(Date field)  as MonthEnd

then create a..report

nareshthavidishetty
Creator III
Creator III
Author

Hi,

I need logic in front end.

My requirement is like

sum(sales) where reported date = 02/28/2016,03/31/2016,04/30/2016,05/31/2016....till year end month.

Thanks..

Anonymous
Not applicable

Hi Naresh,

Try this......

Dimension As  if(Match(Year(MonthEnd(Date Field)),'2016'),MonthEnd(Date Field))

and

Expression as Sum(Dollars)