Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

How I get the formula YearToEnd

Hello together,

I Need your help for a formula

Now is June and I Need the formula from 7-12 dynamiclly. I transform the YTD to a YTE Formual. But it Shows the wrong values.

My YTE formula is

Sum({$<Nature={'Estimate 0'}, [Fiscal Year]=, month=, DateNum={">=$(=Max(DateNum)+1)<=$(=Num(YearEnd(Max(DateNum)))))"}>}Amount)

Do you have a solution?

Thanks

1 Solution

Accepted Solutions
MVP
MVP

Re: How I get the formula YearToEnd

Hi,

Missed Num() to convert date to number.

Sum({$<Nature={'Estimate 0'}, [Fiscal Year]=, month=, DateNum={">=$(=Num(MonthStart(Today(), 1)))<=$(=Num(YearEnd(Max(DateNum))))"}>}Amount)



Regards,

Jagan.

7 Replies
MVP
MVP

Re: How I get the formula YearToEnd

=SUM({<

     Nature={'Estimate 0'},

     [Fiscal Year]=,

     month=,

     DateNum= {'>=$(=NUM(Today()))<=$(=NUM(YearEnd(Today())))'}>}Amount)

Not applicable

Re: How I get the formula YearToEnd

Thank you for this formula

But for the first NUM(Today()) i Need the current Month +1 (e.g. Juni +1 = Juli), it should be dynamically which month is selected.

(Num(YearEnd(today())) here I Need the dynamically the year which is selected (e.g. the current year 2014, it should Show to the End of the year 2014.

Do you have a solution for me.

Thanks

MVP
MVP

Re: How I get the formula YearToEnd

May be like:

NUM(AddMonths(Today(),1))    // to get next month

MVP
MVP

Re: How I get the formula YearToEnd

Hi,

Try like this

Sum({$<Nature={'Estimate 0'}, [Fiscal Year]=, month=, DateNum={">=$(=MonthStart(Today(), 1))<=$(=Num(YearEnd(Max(DateNum))))"}>}Amount)


Regards,

jagan.

Not applicable

Re: How I get the formula YearToEnd

Hello,

is the formula Today() and the selected month the same like May(DateNum)?

MVP
MVP

Re: How I get the formula YearToEnd

Hi,

Missed Num() to convert date to number.

Sum({$<Nature={'Estimate 0'}, [Fiscal Year]=, month=, DateNum={">=$(=Num(MonthStart(Today(), 1)))<=$(=Num(YearEnd(Max(DateNum))))"}>}Amount)



Regards,

Jagan.

MVP
MVP

Re: How I get the formula YearToEnd

Hi,

Today() will give current date (Today - 4th September)

Max(DateNum) - will give the max date in the date field for the current selections.

Regards,

Jagan.

Community Browser