Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ChiCho
Contributor
Contributor

Past Financial Year To date with variables

Hi All,

 

I am trying to create a previous year to date for the last financial year. The financial year runs from March to February. 

I am currently using the below for my Year To Date which works perfectly

sum({<DataType={'Transaction'},FinYear={$(vMaxFinYear)},[Transaction Date]={"<=$(vMaxCurrentDate)"}>}[Meter Count])

Variables are as follows,

vMaxCurrentDate=maxstring(Date)

vMaxFinYear=max(FinYear)

Then for my previous financial year to date I am using the following,

sum({<DataType={'Transaction'},FinYear={$(vMaxFinYear_1)},[Transaction Date]={"<=$(vMaxCurrentDateLY)"}>}[Meter Count])

Variables are as follows,

vMaxCurrentDateLY=maxstring(Date-365)

vMaxFinYear_1=$(vMaxFinYear)-1

 

Any ideas on what is going wrong??

0 Replies