Filter by Current year - 2

8 views
Skip to first unread message

James Glaser

unread,
Dec 22, 2009, 5:37:42 PM12/22/09
to intersystems-de...@googlegroups.com

Greetings,

 

I'd like to set up a Deep See filter that is for the last 2 years.

 

So instead of having to do this:

[Invoice Date Year >= 2008]

 

It would be great to do something like:

[Invoice Date Year >= Current Year - 2]

 

Is this possible?

 

 

 

James Glaser

Liang (Simon) Sha

unread,
Dec 22, 2009, 5:43:42 PM12/22/09
to intersystems-de...@googlegroups.com

You can create a temp dimension using COS code:

 

$SYSTEM.SQL.DATEPART("yyyy",$zd($ztimestamp)) -2

 

And then use the temp dimension in the filter

 

[Invoice Date Year >= Temp Dim]

--

You received this message because you are subscribed to the Google Groups "InterSystems: DeepSee Community" group.
To post to this group, send email to intersystems-de...@googlegroups.com.
To unsubscribe from this group, send email to intersystems-deepsee-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/intersystems-deepsee-community?hl=en.

satish

unread,
Dec 23, 2009, 1:24:49 PM12/23/09
to intersystems-de...@googlegroups.com
Hi James/Liang,
                       I would like like to give my inputs. We can also handle this case by simply writing below code in Pivot filter .
[Invoice Date Year >= $p($ZD($H),"/",3)-2}], I am using this syntax
 
 
Regards
Satish
test.gif

James Glaser

unread,
Dec 28, 2009, 11:11:44 AM12/28/09
to intersystems-de...@googlegroups.com

Satish,

 

This seems like a far cleaner solution, I will give this a try.

 

Thank you!

James

Kenneth Poindexter

unread,
Dec 29, 2009, 10:12:05 AM12/29/09
to intersystems-de...@googlegroups.com
The example below is missing a {
 
It should read:
 
[Invoice Date >= {$p($zd($h),"/",3)-2}]
 
 

Kenneth Poindexter
Sales Engineer – Federal

 

 

p:. (301) 693-3391

e:. kenneth.p...@intersystems.com
|
InterSystems | Caché -&- Ensemble |

 


Sent: Monday, December 28, 2009 11:12 AM
To: intersystems-de...@googlegroups.com
Subject: RE: [InterSystems-DeepSee] RE: Filter by Current year - 2

Reply all
Reply to author
Forward
0 new messages