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: 
nareshthavidishetty
Creator III
Creator III

Set analysis

Hi,

We need the data between the date ranges.Below is the logic which is not getting results.Please provide the right expresiion.

=sum({$<AuditDate >={'9/1/2016'}<={'9/3/2016'}>}PostedSales)

Thanks..

14 Replies
trdandamudi
Master II
Master II

Same here... It is very rare I use hard coded values. Yes, it works without dollar sign expansion...

sunny_talwar

Oh really, with dollar sign expansion also not working? Would you be able to share where you tested this?

johanlindell
Partner - Creator II
Partner - Creator II

I think the syntax should be like this:

Sum({$<AuditDate = {">=9/1/2016<=9/3/2016"}>} PostedSales)


Or if you are using dollarexpansion for the last 3 months


Sum({$<AuditDate = {">$(=Date (AddMonths (Today(), -3)))<=$(=Today ())"}>} PostedSales)

sunny_talwar

Here are the test results

1) =Sum({$<AuditDate = {"$(='>=9/1/2016<=9/3/2016')"}>} PostedSales)

2) =Sum({$<AuditDate = {'>=9/1/2016<=9/3/2016'}>} PostedSales)

3) =Sum({$<AuditDate = {">='9/1/2016'<='9/3/2016' "}>} PostedSales)

1 and 2 worked, but 3 did not work

Capture.PNG

miguelbraga
Partner - Specialist III
Partner - Specialist III

Hey there,

Try to add a variable as a vStartDate and another as a vEndDate. Then you can do like this:

Sum({$<AuditDate = {">=$(=vStartDate)<=$(=vEndDate)"}>} PostedSales)