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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
qlik4asif
Creator III
Creator III

What is wrong in expression

Hi All,

please help me in the below expression

=Num(Sum({<Function={'Seeds Ops'},DateMonth={Date(Addmonths(vMaxDate_IIR,-12),'YYYY-MM')}>}YTD),'##.00')

Capture.PNG

1 Solution

Accepted Solutions
sunny_talwar

May be this

=Num(Sum({<Function = {'Seeds Ops'}, DateMonth = {"$(=Date(AddMonths(vMaxDate_IIR, -12), 'YYYY-MM'))"}>} YTD), '##.00')

View solution in original post

15 Replies
shraddha_g
Partner - Master III
Partner - Master III

try,

Num(Sum({<Function={'Seeds Ops'},DateMonth={$(=Date(Addmonths(vMaxDate_IIR,-12),'YYYY-MM'))}>}YTD),'##.00')

Mark_Little
Luminary
Luminary

Hi Asif,

I would probably focus on the section,

Date(Addmonths(vMaxDate_IIR,-12).'YYYY-MM')

Move this into a text box make sure it is returning the correct value. If it is the place it is a variable.

vLastYear_IIR =  Date(Addmonths(vMaxDate_IIR,-12).'YYYY-MM')


Then update your expression

=Num(Sum({<Function={'Seeds Ops'},DateMonth={'$(vLastYear_IIR)'}>}YTD),'##.00')


Mark

shraddha_g
Partner - Master III
Partner - Master III

Or

Num(Sum({<Function={'Seeds Ops'},DateMonth={$(=Date(Addmonths($(vMaxDate_IIR),-12),'YYYY-MM'))}>}YTD),'##.00')

else

Num(Sum({<Function={'Seeds Ops'},DateMonth={$(=Date(Addmonths($(=vMaxDate_IIR),-12),'YYYY-MM'))}>}YTD),'##.00')

qlik4asif
Creator III
Creator III
Author

Not working

qlik4asif
Creator III
Creator III
Author

Not working

shraddha_g
Partner - Master III
Partner - Master III

try $(vMaxDate_IIR) in Textbox and check whether it is giving correct date value

sunny_talwar

May be this

=Num(Sum({<Function = {'Seeds Ops'}, DateMonth = {"$(=Date(AddMonths(vMaxDate_IIR, -12), 'YYYY-MM'))"}>} YTD), '##.00')

pradosh_thakur
Master II
Master II

'Num(Sum({<Function={'Seeds Ops'},DateMonth={' & Date(Addmonths($(vMaxDate_IIR),-12),'YYYY-MM') & '}>}YTD),'##.00')'

Learning never stops.
qlik4asif
Creator III
Creator III
Author

Thanks Sunny

it Solved