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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
louise_atherton
Contributor III
Contributor III

How do I include a date range in an Sum 'IF' statement?

I'm hoping someone can help me. 

I have an expression which I need to include a date range but I'm struggling to include. 

Current expression

Sum(If(Isnull(Actual Value])=-1,(Estimated Value])))

I need to include a date range within the above

[Date created]={">=27/11/2022<=31/12/2022"}

Any help would be gratefully appreciated as I'm completely stumped. 

Many thanks

Louise 

Labels (1)
1 Solution

Accepted Solutions
QFabian
MVP
MVP

Hi @louise_atherton , please check these options :

//Option if :
Sum(If(Isnull([Actual Value]) and [Date created] >= '27/11/2022' and [Date created] <= '31/12/2022', [Estimated Value]))

//Option Set Analysis

Sum({<[Actual Value] = E({"*"}), [Date created] = {">=27/11/2022<=31/12/2022"} >} [Estimated Value])

Greetings!! Fabián Quezada (QFabian)
did it work for you? give like and mark the solution as accepted.

View solution in original post

3 Replies
QFabian
MVP
MVP

Hi @louise_atherton , please check these options :

//Option if :
Sum(If(Isnull([Actual Value]) and [Date created] >= '27/11/2022' and [Date created] <= '31/12/2022', [Estimated Value]))

//Option Set Analysis

Sum({<[Actual Value] = E({"*"}), [Date created] = {">=27/11/2022<=31/12/2022"} >} [Estimated Value])

Greetings!! Fabián Quezada (QFabian)
did it work for you? give like and mark the solution as accepted.
louise_atherton
Contributor III
Contributor III
Author

Thank you so much for taking the time to respond.  

That worked an absolute treat and has fixed something I have been trying to resolve for some time. 

Many thanks

 

Louise 

QFabian
MVP
MVP

congratulations @louise_atherton , glad to help

Greetings!! Fabián Quezada (QFabian)
did it work for you? give like and mark the solution as accepted.