pivot table filter

9 views
Skip to first unread message

Liang (Simon) Sha

unread,
Aug 19, 2009, 6:32:31 PM8/19/09
to intersystems-de...@googlegroups.com

In defining a filter for a pivot table, why would this work

 

[Request Day = 20090819]

 

And not this

 

[Request Day = $zd($h,8)]

 

How do I use today’s date in a filter like this?

 

Thanks!

Daniel Kutac

unread,
Aug 20, 2009, 2:53:26 AM8/20/09
to intersystems-de...@googlegroups.com

Try curly braces

 

[Request Day = {$zd($h,8)}]

Lexi Hayden

unread,
Aug 20, 2009, 10:52:41 AM8/20/09
to InterSystems: DeepSee Community
For 2009.2, there will be a central, very short book to document this
and other syntax questions. It's called Expressions and Scripts in
DeepSee (DSYN), and a draft is available on the community.

The book also tells you all the places where you can use filter
expressions, COS expressions, etc. (Or at least all the places I know
about.)

In earlier releases, this information was included in various forms in
the different books, but that was hard to keep up to date.

On Aug 20, 2:53 am, "Daniel Kutac" <daniel.ku...@intersystems.com>
wrote:

Anssi Kauppi

unread,
Aug 24, 2009, 3:19:56 AM8/24/09
to InterSystems: DeepSee Community
I guess this "Request Day" refers only to the day (or the month)
component of the whole date.

I have used filter like this:

[ToivottuTutkimuspaiva Year = {##class(DS.Time).TestTime("Year")}] AND
[ToivottuTutkimuspaiva Month = {##class(DS.Time).TestTime
("MonthName")}] AND [ToivottuTutkimuspaiva Day = {##class
(DS.Time).TestTime("Day")}]

If the method TestTime returned current time, it would do exactly what
you are looking for.

The method return something like:

LF>w ##class(DS.Time).TestTime("Year")
2009
LF>w ##class(DS.Time).TestTime("MonthName")
April
LF>w ##class(DS.Time).TestTime("Day")
16
LF>

satish

unread,
Aug 24, 2009, 6:26:51 AM8/24/09
to intersystems-de...@googlegroups.com
Hi,
    I guess you are passing complete date , for example 15 Aug 09 you can pass below syntax in the edit filter of any pivot.
 
[Request Day = {$H-9}]
 or
[Request Day = 15/08/2009]
 
Note :- If you are passing any date picker variable"vvdate" from dashboard to pivot, then it is in 4th format of date.
 
[Request Day = {$ZDH(vvdate,4)}]
 
 
Regards
Satish 
Reply all
Reply to author
Forward
0 new messages