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
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
Highlighted
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
Highlighted
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