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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

MTD,LMTD,Current Quarter&Last Quarter

Hi,

I need a help to impliment the MTD and LMTD(Month Todate,Last Month Todate) using Set Analysis.

I am trying with this expressions but i am not getting result :

MTD : Sum ({<POSTINGYEAR = {$(=max(POSTINGYEAR))}, POSTINGMONTHNUM = {$(=max(POSTINGMONTHNUM))}>} AMOUNT_IN_LC)

LMTD : Sum ({<POSTINGYEAR = {$(=max(POSTINGYEAR))}, POSTINGMONTHNUM = {$(=max(POSTINGMONTHNUM)-1)}>} AMOUNT_IN_LC)

Please help me to achieve

Regards,
Santhosh

Labels (1)
3 Replies
Not applicable
Author

Hi,

Try with below expression.

MTD : Sum ({<POSTINGYEAR = {'$(=max(POSTINGYEAR))'}, POSTINGMONTHNUM = {'$(=max(POSTINGMONTHNUM))'}>} AMOUNT_IN_LC)

LMTD : Sum ({<POSTINGYEAR = {'$(=max(POSTINGYEAR))'}, POSTINGMONTHNUM = {'$(=max(POSTINGMONTHNUM)-1)'}>} AMOUNT_IN_LC)

if this also doesn't work properly, post you sample date here.

- Sridhar



Not applicable
Author

Hi Sridhar,

Thans for ur reply..

With this expression we are getting the values when you select the year.

Please find the sample dates here.

20061231

20070101

20070131

20070228

20070301

20070331

20070401

20070428

20070430

20070530

20070531

20070630

20070701



Not applicable
Author

Hi,

I cant suggest you anything by looking at the dates which you have provided.

t i have attached a sample application by creating my own data. have look at that.

if this also doesnt solve you probs post you sample trans data, i could create sample application and send you.

- Sridhar