10 Replies Latest reply: Sep 3, 2014 10:08 AM by Manish Kachhia

# YTD from previous year

Hello togehter,

I have a YTD Formula (it Shows the right figures)

Sum({\$<Nature={'Actual'},[Fiscal Year]=, month=, DateNum={">=\$(Num(YearStart(Max(DateNum))))<=\$(=(Max(DateNum)))"}>} Amount)

this formula Shows the wrong figures

Sum({\$<Nature={'Actual},[Fiscal Year]=, month=, DateNum={">=\$(=Num(YearStart(Max(DateNum),-1)))>=\$(=AddYear(max(DateNum), -1 ))"}>}Amount)

Do you know why? and could help me.

Thanks

• ###### Re: YTD from previous year

Hi,

Have a look at below post.

http://community.qlik.com/docs/DOC-7045

Regards

ASHFAQ

• ###### Re: YTD from previous year

This is the formula of this post with the Appendix Nature={'Actual'}

• ###### Re: YTD from previous year

Hi,

Smth wrong in your >= <= logic I suppose.

Sum({\$<Nature={'Actual},[Fiscal Year]=, month=, DateNum={">=\$(=Num(YearStart(Max(DateNum),-1)))>=\$(=AddYear(max(DateNum), -1 ))"}>}Amount)

Hope this helps.

Andrei

• ###### Re: YTD from previous year

I Shows only 0 and no values.

Can give me hint why?

• ###### Re: YTD from previous year

Try this

Sum({\$<Nature={'Actual},[Fiscal Year]=, month=,

Amount)

• ###### Re: YTD from previous year

Sum({\$<

Nature={'Actual},

[Fiscal Year]=,

month=,

• ###### Re: YTD from previous year

this code Show nothings no figure only a space.

Do you have a other question?

• ###### Re: YTD from previous year

Yes, Provide sample data :-)

• ###### Re: YTD from previous year

What do you mean with sample data? The structure of the table?

• ###### Re: YTD from previous year

Sum({\$<

Nature={'Actual},

[Fiscal Year]=,

month=,