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: 
ckchouk123
Contributor III
Contributor III

Issue with getting prior year to date calculation

Is there anything wrong with the following Qlik Sense Expression?

Sum({$<[Fiscal Year]={$(=vMaxFY-1)}, [Fiscal Date]={"<=$(vMaxFiscalDatePY)"}>} [Actual Amt])

I have tested the vMaxFY and vMaxFiscalDatePY and they both return the right values:

I am getting all zeros.When I replace the vMaxFiscalDatePY with the actual date, I get values. Any ideas?

Labels (1)
2 Replies
Digvijay_Singh

Try this may be -

Sum({$<[Fiscal Year]={$(=vMaxFY-1)}, [Fiscal Date]={"<=$(=chr(39)&vMaxFiscalDatePY&chr(39))"}>} [Actual Amt])

Digvijay_Singh

Or

Sum({$<[Fiscal Year]={$(=vMaxFY-1)}, [Fiscal Date]={"<=$(=Date($(vMaxFiscalDatePY)))"}>} [Actual Amt])