Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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
Specialist III
Specialist III

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])

QFabian

View solution in original post

3 Replies
QFabian
Specialist III
Specialist III

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])

QFabian
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
Specialist III
Specialist III

congratulations @louise_atherton , glad to help

QFabian