Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis with Variables

Probably a really simple one, but Ive gone number blind

I have a variable vpast that defines a day 4 days prior to the max day in the current selection, if I use this in a text box $(vpast) it correctly evaluates the date, now I am trying to use it in the set analysis of an expression:

=Sum({$<Date={"=$(vPast)"}>}Value)

And the displayed value is in fact sum(Value) for the selected date & not the date 4 days past. I must be missing something but not sure what?

Help appreciated!

4 Replies
swuehl
MVP
MVP

Try

=Sum({$<Date={'$(vPast)'}>}Value)

edit: and QV is case sensitive, just make sure that your variable is called vPast and not vpast as shown above

settu_periasamy
Master III
Master III

May be like this

=Sum({$<Date={'$(=vPast)'}>}Value)

sunny_talwar

Or may be this:


=Sum({$<Date={"$(vPast)"}>}Value)


Where date format for vPast is the same as Date format.

sasiparupudi1
Master III
Master III

=Sum({$<Date={"$(vPast)"}>}Value)