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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

MTD not working

Hi all,

Iam wroung some where please do let me know

I am just calculation YTD and MTD using set analysis

here is my expression

=if(Category='receivable',sum({<YEAR={'<=$(=MAX(YEAR))'},MONTH={'<=$(=MAX(MONTH))'}>} $(EXP)))

here if YTD is working fine,but not MTD ..,

please do let me know where iam wroung

Regards,

Kiruthiga

22 Replies
Not applicable
Author

=Sum({$<Date = {">=$(vMinnDate)<=$(vMaxDate)"}>} QTY)


vMaxDate  = date(MonthEnd(max(Date)),'DD MMM YYYY')

In ur calendar Script use below code..


Caltemp:

LOAD
num(min(%TranDate)) as MinnDate

resident TRANSACTION_TABLE;

LET vMinnDate = peek('MinnDate',0,'Caltemp');

Not applicable
Author

Hey, Thanks a lot Koushik,

I got the solution on friday....,

anyway Thanks again for your timingssss 🙂

Not applicable
Author

Ok...its alright