Page 1 of 1

can i use IF statment on DBRW excel formula

Posted: Wed Jul 31, 2013 6:01 pm
by erin
Hi All
i when created dynamic report for column and report made has 2 cube.
on excel cell i writhe the formula as below:
= IF(M$14<>N$14,DBRW($J$9,$M$11,$O$11,$I21,$H21,N$15),DBRW($M$9,$M$11,$O$11,$I21,$H21,N$16,N$17))
the formula is work on view report. but when i change value on report and save ,
the data can't be save.
how can i solve the problem.

Re: can i use IF statment on DBRW excel formula

Posted: Wed Jul 31, 2013 6:18 pm
by bplaia
are you trying to save the data change back to TM1 or simply read the value from TM1 and put it in the excel sheet?

Re: can i use IF statment on DBRW excel formula

Posted: Wed Jul 31, 2013 10:52 pm
by Martin Ryan
You can use IF's on DBRWs only if you want read only information. If you want to type the value over the DBRW formula and send it back to TM1 then it will not work. This is because of how the Cellupdate event is handled in VBA.

The precedent cells (e.g. cell $M$9) can have IF formulas in them, which could be a way around the problem - though probably not in your case because I see the two cubes have a different number of dimensions in them.

Martin

Re: can i use IF statment on DBRW excel formula

Posted: Thu Aug 01, 2013 3:10 pm
by erin
hi Martin,
many thanks.
yes, in my case the two cubes have a different number of dimensions.
so ... you meaning , the way is not work ?


Martin Ryan wrote:You can use IF's on DBRWs only if you want read only information. If you want to type the value over the DBRW formula and send it back to TM1 then it will not work. This is because of how the Cellupdate event is handled in VBA.

The precedent cells (e.g. cell $M$9) can have IF formulas in them, which could be a way around the problem - though probably not in your case because I see the two cubes have a different number of dimensions in them.

Martin

Re: can i use IF statment on DBRW excel formula

Posted: Thu Aug 01, 2013 3:14 pm
by erin
yes,
i try to save data on excel hseet also change the data.
simple read is okay... but store is not work...

bplaia wrote:are you trying to save the data change back to TM1 or simply read the value from TM1 and put it in the excel sheet?

Re: can i use IF statment on DBRW excel formula

Posted: Thu Aug 01, 2013 5:46 pm
by bplaia
erin wrote:yes,
i try to save data on excel hseet also change the data.
simple read is okay... but store is not work...

bplaia wrote:are you trying to save the data change back to TM1 or simply read the value from TM1 and put it in the excel sheet?
DBRW won't write back to TM1, you have to use a DBS or DBSW formula in order to save data on TM1

Here is the IBM documentation
http://pic.dhe.ibm.com/infocenter/ctm1/ ... k_dbs.html

Re: can i use IF statment on DBRW excel formula

Posted: Thu Aug 01, 2013 8:43 pm
by tomok
bplaia wrote:DBRW won't write back to TM1, you have to use a DBS or DBSW formula in order to save data on TM1
Incorrect. You can write back to TM1 over a DBRW formula. This has been a key feature umpteen years. What you CANNOT do is write back to TM1 in a DBRW when the cell has more than just a plain vanilla DBRW formula (like an IF statement or another DBR lookup or DBRA).

Re: can i use IF statment on DBRW excel formula

Posted: Thu Aug 01, 2013 9:13 pm
by Martin Ryan
erin wrote: yes, in my case the two cubes have a different number of dimensions.
so ... you meaning , the way is not work ?
Yep, that's my meaning. You cannot do what you want to do this way. I think you'll have to create two separate reports, one for cube A and one for cube B.
erin wrote:i try to save data on excel hseet also change the data.
I think you mean that you tried hitting Save in Excel with the intention of saving the data in TM1? If that's what you mean, saving in Excel does nothing in TM1. Saving an Excel workbook will save all the Excel formulas (DBRWs etc) but it does not save the data in TM1. When you type a value into TM1 - regardless of whether that's directly in the cube or via a DBRW formula in Excl - the value is automatically saved in TM1. You don't need to do anything else for it to be retained (to be pedantic, the exception is if the server crashes and logging is turned off, but that's not relevant to your case).

Martin

Re: can i use IF statment on DBRW excel formula

Posted: Fri Aug 02, 2013 5:02 pm
by bplaia
tomok wrote:
bplaia wrote:DBRW won't write back to TM1, you have to use a DBS or DBSW formula in order to save data on TM1
Incorrect. You can write back to TM1 over a DBRW formula. This has been a key feature umpteen years. What you CANNOT do is write back to TM1 in a DBRW when the cell has more than just a plain vanilla DBRW formula (like an IF statement or another DBR lookup or DBRA).
my apologies for the incorrect information and thanks tomok for letting me in on that secret

Re: can i use IF statment on DBRW excel formula

Posted: Fri Aug 02, 2013 8:15 pm
by Darkhorse
turn off calc before save