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: 
Anonymous
Not applicable

Dimension/ Measure Expression

Need to create a new expression to use in table. The expression should incorporate our 'completed_at' date field i'm pretty sure, but I want it to pull dates only within, lets say, a two month period.

The expression I have so far is:

Sum({<completed_at={>=$(=Max(completed_at)-60))

Any help is appreciated.  Thanks in advance.

2 Replies
vamsee
Specialist
Specialist

Hello,

The syntax would be

    {<TIME_KEY = {">$(vFirstPeriod) <$(=vLastPeriod)"} >}

So.

Sum({<completed_at={">=$(=Max(completed_at)-60)<$(=completed_at))"}>}ABCD)


Thanks.

michaelsmith
Contributor III
Contributor III

When you use >= within set analysis you need to use quotation marks - single or double depending upon the contents. For your purposes you should get away with something like the following:

Sum({<

          completed_at={'>=$(=(Max(completed_at)-16))'}

          >}

          ValueToSum)

Hope this helps.