Qlik Community

Qlik Sense App Development

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

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Not applicable

Previous Fiscal Year Expression Issue

I am using the YTD expressions found in these posts, with slight modification for the fiscal year starting July-1: YTQ, QTD, MTD and WTDPrevious YTQ, QTD, MTD and WTD

My Fiscal YTD set analysis expression is the following, this works perfectly

{$<Year=, Month=, Date=, DateNum={">=$(=Num(YearStart(Max(DateNum),0,7)))<=$(=Max(DateNum))"}>}

My Previous Fiscal YTD expression doesn't work at all - I'm assuming its a syntax error as the set analysis doesn't restrict data at all when its used.

{$<Year=, Month=, Date=, DateNum={">=$(=Num(YearStart(Max(DateNum),-1,7)))<=$(=AddYears(Max(DateNum),-1))"}>}

Could anyone take a look at these expressions and tell me what is wrong with the second one?

Thanks for the help!

1 Solution

Accepted Solutions
sinanozdemir
Not applicable

Re: Previous Fiscal Year Expression Issue

Hi,

It seems like your DateNum field is not formatted as date. If so, try the below:

{$<Year=, Month=, Date=, DateNum={">=$(=Num(YearStart(Max(DateNum),-1,7)))<=$(=Num(AddYears(Max(DateNum),-1)))"}>}


Hope this helps.


Thanks

2 Replies
sinanozdemir
Not applicable

Re: Previous Fiscal Year Expression Issue

Hi,

It seems like your DateNum field is not formatted as date. If so, try the below:

{$<Year=, Month=, Date=, DateNum={">=$(=Num(YearStart(Max(DateNum),-1,7)))<=$(=Num(AddYears(Max(DateNum),-1)))"}>}


Hope this helps.


Thanks

sunny_talwar
Not applicable

Re: Previous Fiscal Year Expression Issue

May be this

{$<Year=, Month=, Date=, DateNum={">=$(=Num(YearStart(Max(DateNum),-1,7)))<=$(=Num(AddYears(Max(DateNum),-1)))"}>}