Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
krishna20
Specialist II
Specialist II

LYTD

Hi Friends,

i'm facing problem in LYTD.in my expression last year part  is working but the month part is not working.

CLM_DATE format DD/MM/YYYY

CLM_SETL_DTYear format is 2014,2013,2012.....

CLM_SETL_DTMonth format is JAN,FEB,MAR,,.....

can anyone pls help me out.

=

   if(

   vOptionCurrency = 1, (Sum({<CLM_SETL_DTYear = {$(=Year(Today())-1)},CLM_DATE ={"=num(month(addmonths(Max(CLM_DATE),-12)))"},CS_EST_TYPE = {1}>}CS_AMT_LC_1) //Payment

                         -(Sum({<CLM_SETL_DTYear = {$(=Year(Today())-1)},CLM_DATE = {"=num(month(addmonths(Max(CLM_DATE),-12)))"},CS_EST_TYPE = {3}>}CS_AMT_LC_1)))  //Recovery

                            -(Sum({<CLM_SETL_DTYear = {$(=Year(Today())-1)},CLM_DATE = {"=num(month(addmonths(Max(CLM_DATE),-12)))"},CS_EST_TYPE = {2}>}CS_AMT_LC_1)  //Reversal Of Payment

                              -(Sum({<CLM_SETL_DTYear = {$(=Year(Today())-1)},CLM_DATE = {"=num(month(addmonths(Max(CLM_DATE),-12)))"},CS_EST_TYPE = {4}>}CS_AMT_LC_1))),  //Reversal of Recovery

    if(

    vOptionCurrency = 3, (Sum({<CLM_SETL_DTYear = {$(=Year(Today())-1)},CLM_DATE = {"=num(month(addmonths(Max(CLM_DATE),-12)))"},CS_EST_TYPE = {1}>}CS_AMT_LC_3) //Payment

    -(Sum({<CLM_SETL_DTYear = {$(=Year(Today())-1)},CLM_DATE = {"=num(month(addmonths(Max(CLM_DATE),-12)))"},CS_EST_TYPE = {3}>}CS_AMT_LC_3)))  //Recovery

       -(Sum({<CLM_SETL_DTYear = {$(=Year(Today())-1)},CLM_DATE = {"=num(month(addmonths(Max(CLM_DATE),-12)))"},CS_EST_TYPE = {2}>}CS_AMT_LC_3)  //Reversal Of Payment

          -(Sum({<CLM_SETL_DTYear = {$(=Year(Today())-1)},CLM_DATE = {"=num(month(addmonths(Max(CLM_DATE),-12)))"},CS_EST_TYPE = {4}>}CS_AMT_LC_3)))) ) //Reversal of Recovery

Regards

Krishna

14 Replies
krishna20
Specialist II
Specialist II
Author

Hi Satyadev,

Pls find the below attachment and guide me to solve this issue.

Pls clear the application once you opened it and select QIC,Abhudhabi.

Regards

Krishna

Anonymous
Not applicable

I did checked with simple sum and it is matching with second last set analysis script (see below the set analysis script and matching table).

claim.JPG.jpg

set.JPG.jpg

krishna20
Specialist II
Specialist II
Author

Hi, Satyadev,

Thanks for your reply,

I did exactly what you guided me.But,the values are still differ.I'm unable to get exact output.

Regards

Krishna

Anonymous
Not applicable

Kalyan,

See attachment. In Sheet38, I did some testing and looks like the LYTD logic is fine. I have taken simple sum of values and LYTD logic and both columns are matching for 2013.

Let me know if I am missing something.

krishna20
Specialist II
Specialist II
Author

Thank You satyaDev,

Sorry for late reply..

Thanks and Regards

krishna