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: 
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

16 Replies
Kushal_Chawda

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

Kushal_Chawda

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

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

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