replacing Tm1 with VBA

Post Reply
nykager
Posts: 4
Joined: Mon Jun 06, 2011 7:58 pm
OLAP Product: TM1
Version: 8.1.1
Excel Version: 2003

replacing Tm1 with VBA

Post by nykager »

Hi,

my boss wants me to replace the Tm1 system which we only use to get data from our SAP downloads into the Excelfiles (TM1 v.8 is to slow for her..)

Now my question, which may sound very stupid, but can I replace TM1 with VBA codes? I am only an Intern and not really the best in IT questions. :oops: :(

Thanks for your answer, and sorry if this thread is opened in the wrong section, I am as well not from an english speaking country, it is kinda hard for me :oops:
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: replacing Tm1 with VBA

Post by David Usherwood »

Depends on what the TM1 application is doing. If it's been built properly I'd be really surprised if porting it to VBA would speed it up. Also, if you are on maintenance, you can upgrade to a newer version without charge.
nykager
Posts: 4
Joined: Mon Jun 06, 2011 7:58 pm
OLAP Product: TM1
Version: 8.1.1
Excel Version: 2003

Re: replacing Tm1 with VBA

Post by nykager »

We just use Tm1 to bring data from the SAP download to our balance sheets and statements.

The formulas in excel look like this: =DBRW("tm1usa:costctr",$B53,$A$1,$C$10,$B$1,$B$2)

While B53, A1, C10, B1 and B2 are criterias to sort the data in correctly.

Updating these files takes up to 5 minutes sometimes..
Paul Segal
Community Contributor
Posts: 314
Joined: Mon May 12, 2008 8:11 am
OLAP Product: TM1
Version: TM1 11 and up
Excel Version: Too many to count

Re: replacing Tm1 with VBA

Post by Paul Segal »

On the off-chance, you should check that calculation is set to manual in Excel (Tools, Options, Calculation in the Excel menu bar).
Paul
nykager
Posts: 4
Joined: Mon Jun 06, 2011 7:58 pm
OLAP Product: TM1
Version: 8.1.1
Excel Version: 2003

Re: replacing Tm1 with VBA

Post by nykager »

Thank you, but thats not the case, I am in manual calculation when working with Tm 1 files.

If I hit F9 my excel will freeze and calculate for 5 minutes or something, then TM1 is updated and I can go on. And my Boss thinks, that VBA is way faster.
(My computer skills are decent, it is just the first time in my life I have to work with tm1)
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: replacing Tm1 with VBA

Post by lotsaram »

nykager wrote:Thank you, but thats not the case, I am in manual calculation when working with Tm 1 files.

If I hit F9 my excel will freeze and calculate for 5 minutes or something, then TM1 is updated and I can go on. And my Boss thinks, that VBA is way faster.
(My computer skills are decent, it is just the first time in my life I have to work with tm1)
I would advise you to get someone who is skilled in TM1 to review your reporting spreadsheets, I'm betting they are constructed in ways that are far from optimal. I notice that the example you gave in which your DBRW references are written uses a hardcoded reference to the cube not a cell reference.
=DBRW("tm1usa:costctr",$B53,$A$1,$C$10,$B$1,$B$2)
This means you are not using a VIEW function to optimize the retrieval of data from the TM1 server (hint look this up in the TM1 reference material and for a practical example slice out a view to a worksheet and look at cell B1.)

Recently I had a case where a workbook that was taking 5 - 8 minutes to calculate on each refresh was reduced to 20 - 30 sec on initial refresh and <5 sec on subsequent refreshes by adding correct VIEW formulas. This is a good place to start.
ParisHilton
Posts: 73
Joined: Fri Apr 23, 2010 11:35 am
OLAP Product: Tm1
Version: 9.5
Excel Version: 2007 2010

Re: replacing Tm1 with VBA

Post by ParisHilton »

I'm intrigued by the view function and the potential performance gains.

I've just done as you've suggested, and B1 refers to a view, but cell references still look like

=DBRW($B$1,B$5,$B$2,$A20,B$6)

Could you explain what the giveaway is?

Also, is a view function, simply a slice against a view? I would presume the performance gain would be from the view being precalculated in TM1 ?

Sorry for gatecrashing the party!!!!
“The way I see it, you should live everyday like its your birthday”


TM1 9.5 Cognos BI 8.4 Excel 2007. 128GB Ram. E7450@2.40Ghz -24 core. Fluffy white dog.
nykager
Posts: 4
Joined: Mon Jun 06, 2011 7:58 pm
OLAP Product: TM1
Version: 8.1.1
Excel Version: 2003

Re: replacing Tm1 with VBA

Post by nykager »

Thank you very much.

Problem is, noone is skilled in TM1 here, they just want to get rid of tm1 because they think it is to slow.

Is there any 'easy to understand' tutorial online for tm1 or how should I learn about the view formulas?

Thanks again, great forum!
ParisHilton
Posts: 73
Joined: Fri Apr 23, 2010 11:35 am
OLAP Product: Tm1
Version: 9.5
Excel Version: 2007 2010

Re: replacing Tm1 with VBA

Post by ParisHilton »

Are they willing to pay c £1k a day for someone to come in and sort out the performance problems?????
“The way I see it, you should live everyday like its your birthday”


TM1 9.5 Cognos BI 8.4 Excel 2007. 128GB Ram. E7450@2.40Ghz -24 core. Fluffy white dog.
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: replacing Tm1 with VBA

Post by lotsaram »

ParisHilton wrote:Are they willing to pay c £1k a day for someone to come in and sort out the performance problems?????
If they are stuck on v8.1 I think not. The fact that an intern has been tasked with the problem is somewhat of a giveaway..

In terms of what a VIEW formuals does look up "Stargate" and ignore any references to SciFi. There are various discussions and technical papers burried away. Part of the benefit is indeed that once the view is calculated the vlaues are cached and returned without needign to recalculate (assuming no data change between queries), this is why subsequent refreshes are much faster. The other part of the benefit is that once the view is built the entire view array can be returned effectively in one go at more or less the same speed of a single cell retrieval, this is why using view formulas correctly can have performance benefits on the initial query and not jsut subsequent queries. (But it can be trial and error, the size of the benefit will depend on the time required to built the view versus the gain from the faster retrieval. It can depend on dimension size, complexity of calculations, etc. Most of the time there is a benefit and it can be very significant, but not always.)
ParisHilton
Posts: 73
Joined: Fri Apr 23, 2010 11:35 am
OLAP Product: Tm1
Version: 9.5
Excel Version: 2007 2010

Re: replacing Tm1 with VBA

Post by ParisHilton »

lotsaram wrote:
ParisHilton wrote:Are they willing to pay c £1k a day for someone to come in and sort out the performance problems?????
If they are stuck on v8.1 I think not. The fact that an intern has been tasked with the problem is somewhat of a giveaway..

In terms of what a VIEW formuals does look up "Stargate" and ignore any references to SciFi. There are various discussions and technical papers burried away. Part of the benefit is indeed that once the view is calculated the vlaues are cached and returned without needign to recalculate (assuming no data change between queries), this is why subsequent refreshes are much faster. The other part of the benefit is that once the view is built the entire view array can be returned effectively in one go at more or less the same speed of a single cell retrieval, this is why using view formulas correctly can have performance benefits on the initial query and not jsut subsequent queries. (But it can be trial and error, the size of the benefit will depend on the time required to built the view versus the gain from the faster retrieval. It can depend on dimension size, complexity of calculations, etc. Most of the time there is a benefit and it can be very significant, but not always.)
I didn't think the v8.1 bit through, but intern bit was a clue that Watson would have got.
Thanks for taking your time to explain the view issues. I'm a former XL junkie and I just love TM1 all the more , the more I find out about it. At it's heart it really is a dream for coders. I just hope IBM don't fluff it up too much and concentrate on getting some of the peripheral bits more interoperable and polished.
“The way I see it, you should live everyday like its your birthday”


TM1 9.5 Cognos BI 8.4 Excel 2007. 128GB Ram. E7450@2.40Ghz -24 core. Fluffy white dog.
User avatar
Martin Ryan
Site Admin
Posts: 2003
Joined: Sat May 10, 2008 9:08 am
OLAP Product: TM1
Version: 10.1
Excel Version: 2010
Location: Wellington, New Zealand
Contact:

Re: replacing Tm1 with VBA

Post by Martin Ryan »

nykager wrote: Problem is, noone is skilled in TM1 here, they just want to get rid of tm1 because they think it is to slow.
If there's a complete lack of interest in TM1 then you might be best to start from scratch. Export the SAP files to something else and just bypass TM1 completely.
nykager wrote: Is there any 'easy to understand' tutorial online for tm1 or how should I learn about the view formulas?
There is a tracer for the DBRW formulas in the TM1 tools add-in (http://www.tm1forum.com/viewtopic.php?f=21&t=2515) which will help you get started.

There are a couple of tutorials on You Tube but there is nothing anywhere remotely comprehensive. You can get one on one training but that'll be the 1k a day figure mentioned above.

Otherwise you'll just have to muddle through the manuals and come back here for help when you need it.

Martin
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
stex2727
Posts: 66
Joined: Tue Sep 15, 2009 11:29 pm
OLAP Product: TM1
Version: 9.4
Excel Version: 2007

Re: replacing Tm1 with VBA

Post by stex2727 »

lotsaram wrote:
ParisHilton wrote:Are they willing to pay c £1k a day for someone to come in and sort out the performance problems?????
If they are stuck on v8.1 I think not. The fact that an intern has been tasked with the problem is somewhat of a giveaway..
Yet [sigh] I bet they pay their SAP consultants 2.5k per day.

Steve
Post Reply