Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Fl_Scn
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
menta
Partner - Creator II
Partner - Creator II

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
menta
Partner - Creator II
Partner - Creator II

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)