Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

YTD for last year

Hi All,

I am struggling to find a solution to show me YTD values for the last fiscal year and was hoping that someone could help..

My current expression is ..

=Sum({<[Fiscal Year]={$(=Max([Fiscal Year])-1)}>}[Sales Amount GBP])

that just gives me the total sales for the last fiscal year, i want it to look at this years current week number but apply that to the set analysis to show from week 1 to the current week last year.. if that makes sense..

my week field is :

Op_Week

Can anyone help?

Many thanks

1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

let vCurrWeek= week(today())

=Sum({<[Fiscal Year]={$(=Max([Fiscal Year])-1)},

Op_Week={'>=1<=$(vCurrWeek)'}

>}[Sales Amount GBP])

Hope it helps

View solution in original post

3 Replies
manideep78
Partner - Specialist
Partner - Specialist

Could you please provide some samle data???

alexandros17
Partner - Champion III
Partner - Champion III

let vCurrWeek= week(today())

=Sum({<[Fiscal Year]={$(=Max([Fiscal Year])-1)},

Op_Week={'>=1<=$(vCurrWeek)'}

>}[Sales Amount GBP])

Hope it helps

manideep78
Partner - Specialist
Partner - Specialist

Try this

Sum({<[Fiscal Year]={"$(=Max([Fiscal Year])-1)"},Op_Week={">=1<=$(=Week(Today()))"}>}[Sales Amount GBP])

Hope it helps