Qlik Community

Qlik Education Discussions

Discussion Board for collaboration related to Qlik Education.

Not applicable


Hi I have this for this year to date,  what would be the code for last year to date please.


6 Replies

Re: Date

I think that you need to become more specific on that.

Could you please give us some more information?


Not applicable

Re: Date

{$(#vYearThisMonth)} this is a expression to show me information based on year to date.  i don't know how that expression should be to show me year to date last year.

would it be something like {$(#vLastYearThisMonth)}?

Thanks.  PS appreciate all your help

Re: Date

Frankly speaking this is not an expression this is  a variable use as expression.

You can name your variable as you wish.

Check this place:

Settings-Variable Overview or

Settings -Expression Overview

and you will see how this variable has been defined.

Not applicable

Re: Date

Thanks I found the information

{$(#vYearThisMonth)} = =Year(MonthEnd(Today()))      //

count ({<[PV_Case.Quote Year] = {$(#vYearThisMonth)}, [PV_Case.Quote No_Prefix] = {SQ}, [PV_Job_Calculation_Detail.Line Type] = {1}, PV_Job.Status_List = {Quote},PV_Job.Active_List = {Yes}>}[PV_Job.Quoted Price])

{$(#vYearLastMonth)} = =Year(MonthStart(Today())-1) //

count ({<[PV_Case.Quote Year] = {$(#vYearLastMonth)}, [PV_Case.Quote No_Prefix] = {SQ}, [PV_Job_Calculation_Detail.Line Type] = {1}, PV_Job.Status_List = {Quote},PV_Job.Active_List = {Yes}>}[PV_Job.Quoted Price])

I seem to be getting the same values this year and last year.  What have I don’t wrong?



Re: Date

Look at this topic

Year to Date vs Year to date Last Year

and Steve Dark post about YTD

Community Browser