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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

YTD Calculation

Hi All,

  I am having a appln that I need to calulcate YTD with below logic. My financial year start at 4th month so when I click May
I need to get cumulative values of Apr and May. Same applies till March.

Labels (1)
4 Replies
Anonymous
Not applicable
Author

The YearTodate function have got Starting month as 3rd argument, you can mention 4 (april) as you starting month

2nd argument is an offset 0 refers to this year, -1 referes to last year +1 refers to next year same periods

YearTodate(Date,0,4,Today())

Anonymous
Not applicable
Author

Hi Bhagirath,

  Thanks for your reply. Actually I dont have any issues in date field,also I have created a Financial year which start from Apr,

All I need is,to have a Exp that should calculate in above mentioned manner

Not applicable
Author

hi,

use it

variable    vMAxDate=max(Date)

=Sum({$<Fin_Year=,Month=>}InYearToDate(Date,'$(vMaxDate)',0,4) * -1 *((Value)))

Regards

Vimlesh

Not applicable
Author

Hi,

Check App.

Regards

Vimlesh