How to feed system time?

Post Reply
bunchukokoy
Regular Participant
Posts: 197
Joined: Thu Dec 03, 2009 8:47 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2.x
Excel Version: 2010
Location: Singapore

How to feed system time?

Post by bunchukokoy »

Hi Everyone!

Guys,

This is my first time to use rules in getting the system time. Here's my code:
skipcheck;

feedstrings;

['current date','system']=S:timst(now,'\m/\d/\Y');
['current month','system']=S:timst(now,'\M\Y');

['current quarter','system']=S:str(numbr(timst(now,'\Y'))+attrn('report month',timst(now,'\m'),'fiscal year'),4,0)|attrs('report month',timst(now,'\m'),'quarter');
['current mtd','system']=S:timst(now,'\m/\d/\Y')|' MTD';
['current ytd','system']=S:timst(now,'\m/\d/\Y')|' YTD';
['current fiscal year','system']=S:'FY '|str(numbr(timst(now,'\Y'))+attrn('report month',timst(now,'\m'),'fiscal year'),4,0);

feeders;
My problem is whenever I toggle the icon to suppress zeroes. It prompts No Values. Of course these cells should be fed. But I really don't have an idea.

Thanks for the help.

Bunch :D :D
User avatar
rkaif
Community Contributor
Posts: 328
Joined: Fri Sep 05, 2008 6:58 pm
OLAP Product: IBM Cognos TM1
Version: 9.1 or later
Excel Version: 2003 or later

Re: How to feed system time?

Post by rkaif »

One thing which I have noticed in your Rules is that the FEEDSTRING should be on the first line of the Rules file. So it should appear before SKIPCHECK.
Cheers!
Rizwan Kaif
Gregor Koch
MVP
Posts: 263
Joined: Fri Jun 27, 2008 12:15 am
OLAP Product: Cognos TM1, CX
Version: 9.0 and up
Excel Version: 2007 and up

Re: How to feed system time?

Post by Gregor Koch »

Hi

Agree with rkaif.

But, if the only reason for feeding is the zero suppression I would opt not to feed it at all and create a view that has all your system measures you need to see and not zero suppress the view.
Note that you don't need to feed these measures even if you want to use them in other calculations.
In addition to this, if these rules are on a two dimensional 'control' cube in which you have no need of consolidating any numbers, you could also consider not to use Skipcheck; and Feeders; at all.
bunchukokoy
Regular Participant
Posts: 197
Joined: Thu Dec 03, 2009 8:47 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2.x
Excel Version: 2010
Location: Singapore

Re: How to feed system time?

Post by bunchukokoy »

Wow!

Nice additional ideas. Thanks very much guys! :D

Bunch
lotsaram
MVP
Posts: 3706
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: How to feed system time?

Post by lotsaram »

In my experience it doesn't matter is feedstrings is before or after skipcheck. The issue is that feeding has to start with real input data somewhere and in this cube you don't seem to have any. If you want to feed the values then create a data input cell (it could be string or numeric) and feed all your time measures from there.

But that's just a technical solution. As for a practical solution I agree with Gregor. For a small 2D system cube there is no need for skipcheck or feeders at all.
Post Reply