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: 
prma7799
Master III
Master III

MTD Expression

Anyone can tell me that is below code is right for  MTD expression

SUM({$<FinancialYear=, Quarter=,FiscalYear={$(=max(FiscalYear))}

,[PostingDate]={">=$(=MonthStart(max({$<FiscalYear={$(=max(FiscalYear))}>}[PostingDate])))<=$(=max({$<FiscalYear={$(=max(FiscalYear))}>}[PostingDate]))"}

>}Target )

Thanks

Labels (1)
16 Replies
Kushal_Chawda
MVP
MVP

Expression looks correct to me. Are you facing any issue?

Kushal_Chawda
MVP
MVP

or this will be sufficient, make sure that your [PostingDate] is in proper date format.

SUM({$<FinancialYear=, Quarter=,FiscalYear={"$(=max(FiscalYear))"},

[PostingDate]={">=$(=monthstart(max([PostingDate])))<=$(=max([PostingDate]))"}>}Target)

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Looks ok, but you may have to format the dates too:

SUM({$<FinancialYear=, Quarter=,FiscalYear={$(=max(FiscalYear))}

,[PostingDate]={">=$(=Date(MonthStart(max([PostingDate]))))<=$(=Date(max([PostingDate])))"}

>}Target )


talk is cheap, supply exceeds demand
ahmar811
Creator III
Creator III

hi

Please try this expression for MTD

SUM({$<FinancialYear=, Quarter=,FiscalYear={$(=max(FiscalYear))},

[PostingDate]={">=$(=MonthStart(max([PostingDate])))<=$(=MonthEnd(max([PostingDate])))"}>}Target )

Hope this help you

Thanks & Regards

Ahmar Ansari

prma7799
Master III
Master III
Author

am not getting proper targets in using this expression .

prma7799
Master III
Master III
Author

Hi gwassenaar‌,

Can you please look here

https://community.qlik.com/thread/212452

Thanks

Anonymous
Not applicable

might be helpful for you?

Set Analysis for certain Point in Time

sunny_talwar
MVP
MVP

I would take this another step by adding the formatting of PostingDate to the left hand side of the equation:

Sum({$<FinancialYear=, Quarter=, FiscalYear = {$(=Max(FiscalYear))}, [PostingDate] ={">=$(=Date(MonthStart(Max([PostingDate])), 'PostingDateFormatHere'))<=$(=Date(max([PostingDate]), 'PostingDateFormatHere'))"}>} Target)

prma7799
Master III
Master III
Author

data.png

data target.png