Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date

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

{$(#vYearThisMonth)}

6 Replies
Agis-Kalogiannis
Employee
Employee

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

Could you please give us some more information?

Thanks

Not applicable
Author

{$(#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

robert_mika
Master III
Master III

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
Author


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?

Regards

Tyrone

robert_mika
Master III
Master III

Look at this topic

Year to Date vs Year to date Last Year

and Steve Dark post about YTD