Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

QlikWorld happening right now! You can still join: REGISTER NOW
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date functions in set expression

Hi, I want to have a table which constantly shows recent sales, regardless of current selection. Currently I'm a bit lost at why these two below don't yield same results?

Sum(If(date > '2016-08-08', sales))                         works fine

Sum({$< date = {"> '2016-08-08'"}>} sales)               gives zero as the result

And next question would be how to use functions in set expression. Ideally I'd want to have something like

Sum({1< date = {"> Date(Interval(Today() - 7, 'D'))"}>} sales)               but that gives zero as well.

Labels (1)
1 Solution

Accepted Solutions

How about this:

Sum({<date = {"$(='>' & Date(WeekStart(Today(), -1), 'YYYY-MM-DD'))"}>} sales)

Also read here about Dates in Set Analysis

View solution in original post

7 Replies
Not applicable

Hi MIkko,

I think your date format is not right, Please check your date format with which you are matching as mine is working fine:

Sum({$< date = {"> '2016-08-08'"}>} sales) 

If your question is now answered, Please flag the Correct Answer (via the big "Correct Answer" button near every post).


How about this:

Sum({<date = {"$(='>' & Date(WeekStart(Today(), -1), 'YYYY-MM-DD'))"}>} sales)

Also read here about Dates in Set Analysis

Not applicable

Sum({<date = {"$(='>' & Date(WeekStart(Today(), -1), 'YYYY-MM-DD'))"}>} sales)

That worked, thanks Sunny!

Rohit: Thanks for checking that out. I have these in Data load editor

SET TimeFormat='h:mm:ss TT';

SET DateFormat='YYYY-MM-DD';

SET TimestampFormat='YYYY-MM-DD h:mm:ss[.fff] TT';

so I would assume it should compare those dates correctly?

An arbitraty date with

Sum({$< date = {"$(='>' & Date('2016-08-08', YYYY-MM-DD))"}>} sales)

works though, so the problem definitely is somewhere within the date formating.


If you got what you wanted, I would request you to close this thread by marking the correct responses and any helpful responses.

Qlik Community Tip: Marking Replies as Correct or Helpful



Not applicable

Hi Sunny,Capture.PNG

Actually I have only Qlik View Server License not Publisher license, Can I do this activity with this ?

I was looking at Qlik View sample application and there is a chart layout (Object Container )like there are three buttons(Cycle, Drill, Details by Year), Every Button linked with a different chart(Can be line or bar chart). you just need to click on any of the buttons,linked chart will appear on the basis of linking,

Same type of layout works with Variable Extension in Qlik Sense but Problem here is you can link field with the variable button not any chart, Can you please help me , How to create Qlik View Object Container in Qlik Sense

There is one more requirement, I have a field where URLs are coming with every record , When I view that column in Qlik view , I can click on that URL and it will open in default browser, Expression behind that column is


Same I want to achieve in Qlik Sense but <URL> key word is not working. Can you help me to know how to display URL in any column ?

Contributor III
Contributor III

Many Thanks Sunny T...this post of yours came in handy/helped solve a date related issue.


Awesome!! I am glad it did