Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

ckchouk123
New Contributor II

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?

2 Replies
Digvijay_Singh
Honored Contributor III

Re: Issue with getting prior year to date calculation

Try this may be -

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

Digvijay_Singh
Honored Contributor III

Re: Issue with getting prior year to date calculation

Or

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

Community Browser