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

Offset dates in set analysis

Hi all,

I want to get the standard deviation of a set of values. There is more than year's data in the file, but I only want to consider the values of the last 150 days in the expression. I currently have:

=Stdev({$<[process date]={">=$(Date(today()-150),'DD-MM-YYYY')"}>}  [Quantity produced] )

(The format of process date is 'DD-MM-YYYY')


Can someone please point me in the right direction?


Kind regards,

Florian

1 Solution

Accepted Solutions
sunny_talwar

May be try this (Edits in Red)

=Stdev({$<[process date]={">=$(=Date(Today()-150, 'DD-MM-YYYY'))"}>}  [Quantity produced])

View solution in original post

5 Replies
sunny_talwar

May be try this (Edits in Red)

=Stdev({$<[process date]={">=$(=Date(Today()-150, 'DD-MM-YYYY'))"}>}  [Quantity produced])

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

As stated by above you need the equal (=) sign before the Date. You are using a function there is it has to evaluate and to achieve that equal sign is needed.

=Stdev({$<[process date]={">=$(=Date(today()-150),'DD-MM-YYYY')"}>}  [Quantity produced] )

sunny_talwar

I think there is a misplaced parentheses in there too...

=Stdev({$<[process date]={">=$(=Date(today()-150),'DD-MM-YYYY')"}>}  [Quantity produced])

vs.

=Stdev({$<[process date]={">=$(=Date(today()-150,'DD-MM-YYYY'))"}>}  [Quantity produced] )

Not applicable
Author

Thanks a lot, this works perfectly. Gabriel thanks for the explanation about the equals sign, I was unaware of this.

sunny_talwar

Awesome, we are glad to help