Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

LYTD with BillingDate and BusinessYear

Hi guys,

I'm trying to get the sum of the sales from last business year to todays date a year ago:

sum({<


Businessyear  =    {$(=year(today(2))-1)},
Billingdate       <    {$(=Date(AddYears(today(2), -1)))}

 

>}

Sales)

 

How can I get here the sales till the date a year ago? Seems like this '<' operator doesn't work with the Billingdate field.

 

Thanks!

Labels (3)
1 Solution

Accepted Solutions
Highlighted
Contributor III
Contributor III

Try this

 

sum({<


Businessyear = {"$(=year(today(2))-1)"},
Billingdate = {"<$(=Date(AddYears(today(2), -1)))"}

 

>}

Sales)

View solution in original post

2 Replies
Highlighted
Contributor III
Contributor III

Try this

 

sum({<


Businessyear = {"$(=year(today(2))-1)"},
Billingdate = {"<$(=Date(AddYears(today(2), -1)))"}

 

>}

Sales)

View solution in original post

Highlighted
Contributor III
Contributor III

Looks good thanks!