Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Vamsy1991
Contributor
Contributor

How to get 2012 YTD claims Vs 2011 YTD claims

Hi,

I am trying this.But i didn't get the proper output.Please give me the solution for the below snap.

snap_db.PNG

3 Replies
shiveshsingh
Master
Master

(YTD2012 Claims - YTD2011 Claims)

You can put expression on basis of above formula. I hope you were looking for this only? or the expressions?

sum({Year = {"$(=Max(Year)-7)"},Int_Month  = {">=$(=(Max(Int_Month))"}}Claims)   for 2012

sum({Year = {"$(=Max(Year)-8)"},Int_Month  = {">=$(=(Max(Int_Month))"}}Claims)    For 2011

MK_QSL
MVP
MVP

What is the base of 2012?

I mean it is static value or it is based on today's year minus 4 or 5 years back?

qv_testing
Specialist II
Specialist II

Try this,

YTD:

=sum({$<Year=,Month=, Date={'>=$(=YearStart(Today()))<=$(=Today())'}>}Sales)


Previous YTD:

=sum({$<Year=,Month=, Date={'>=$(=YearStart(Today(), -1))<=$(=AddYears(Today(), -1))'}>}Sales)


Suppose if you have these years = 2018, 2017, 2017, 2016, 2015

If you make selection 2018=  2018 YTD and 2017 Pre YTD

                                   2016=  2016 YTD and 2015 Pre YTD


Hope it helps...!