Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor

If condition to set analysis

Hi there,

is it possible to convert this to set analysis? 

 

Sum (If(Year(INVOICEDATE)=2018 and INVOICEDATE <= AddMonths(today()-1,-24), SALES))

 

Thank You!

Labels (1)
1 Solution

Accepted Solutions
Partner
Partner

Sum ({<INVOICEDATE={">='01/01/2018' <= $(=Date(AddMonths(today()-1,-24)))  "}>} SALES)

 

To use Year(INVOICEDATE) you need to create an Year field in script, in this case you can use this

 

SUM({<Year={2018}, INVOICEDATE={"<= $(=Date(AddMonths(today()-1,-24))) "}>} SALES)

 

View solution in original post

1 Reply
Partner
Partner

Sum ({<INVOICEDATE={">='01/01/2018' <= $(=Date(AddMonths(today()-1,-24)))  "}>} SALES)

 

To use Year(INVOICEDATE) you need to create an Year field in script, in this case you can use this

 

SUM({<Year={2018}, INVOICEDATE={"<= $(=Date(AddMonths(today()-1,-24))) "}>} SALES)

 

View solution in original post