Page 1 of 1

Zero out with DBS on consolidated element

Posted: Tue Dec 17, 2024 9:14 am
by schlemiel29
Hi all,
I have a cube with one dimension having all leaf elements and one "total" element. To zero out a slice I want to use
DBS(0,"Cube", "Dim1", ...)
This doesn't work. There is no error, simply nothing happens. I also tryied
DBSW(0,"Cube", "Dim1", ...)
DBS("S0","Cube", "Dim1", ...)
DBSW("S0","Cube", "Dim1", ...)
DBS("P|0","Cube", "Dim1", ...)
DBSW("P|0","Cube", "Dim1", ...)

Unsuccesful. In view browser, I see the consolidated element as a gray cell and I can enter a "S0" or "S|0". So all leaf elements will be zerod out. So this feature worked, but not with DBS or DBSW.
Where is my problem?
BR
Dirk

Re: Zero out with DBS on consolidated element

Posted: Tue Dec 17, 2024 9:22 am
by declanr
The DBS formula is cell specific so when you try updating the consolidation it is only trying to update that cell and it finds that it is a consolidation which means it is non updateable.
When you manually type into the cell with something like "C" or "S0" you are actually calling shortcuts to the spreading logic which is what makes it update the leaf cells under the consolidation; but the DBS formula doesn't have access to spreading.

You have a few options if you want to do a zero out from Excel; e.gg you could tell the user to enter the spreading shortcut or you could give them a process button to execute a TI that picks up the relevant elements via parameters and creates a view and does a zero out (technically you could also use the in-built spreading within the TI to run it at the C level directly but a viewzeroout will almost certainly be quicker.)

Re: Zero out with DBS on consolidated element

Posted: Wed Dec 18, 2024 5:31 pm
by Wim Gielis
schlemiel29 wrote: Tue Dec 17, 2024 9:14 am Hi all,
I have a cube with one dimension having all leaf elements and one "total" element. To zero out a slice I want to use
DBS(0,"Cube", "Dim1", ...)
This doesn't work. There is no error, simply nothing happens. I also tryied
DBSW(0,"Cube", "Dim1", ...)
DBS("S0","Cube", "Dim1", ...)
DBSW("S0","Cube", "Dim1", ...)
DBS("P|0","Cube", "Dim1", ...)
DBSW("P|0","Cube", "Dim1", ...)

Unsuccesful. In view browser, I see the consolidated element as a gray cell and I can enter a "S0" or "S|0". So all leaf elements will be zerod out. So this feature worked, but not with DBS or DBSW.
Where is my problem?
BR
Dirk
Hello Dirk,

Would it be an option to follow a TM1/PA course with a partner where you live/work ?
That could well give you a boost in stepping up the learning curve, given the other topics you created too.

Re: Zero out with DBS on consolidated element

Posted: Fri Dec 20, 2024 2:10 am
by JohnO
Try TM1VAL with the parameter to clear

Re: Zero out with DBS on consolidated element

Posted: Sun Dec 22, 2024 12:11 am
by Wim Gielis
JohnO wrote: Fri Dec 20, 2024 2:10 am Try TM1VAL with the parameter to clear
Nice one !

Re: Zero out with DBS on consolidated element

Posted: Mon Dec 23, 2024 5:26 pm
by glaurens
You could also use CellPutProportionalSpread but you'll have to encapsulate within CellGetN <> 0. Not best practice by far, but it'll work

Re: Zero out with DBS on consolidated element

Posted: Tue Dec 24, 2024 2:42 pm
by Wim Gielis
glaurens wrote: Mon Dec 23, 2024 5:26 pm You could also use CellPutProportionalSpread but you'll have to encapsulate within CellGetN <> 0. Not best practice by far, but it'll work
It's few lines of code but a real zero out (ViewZeroOut) is quicker.

Re: Zero out with DBS on consolidated element

Posted: Wed Dec 25, 2024 4:40 pm
by glaurens
Definitely, ViewZeroOut is by far the better option. It's just something that I used 20 years ago before I knew better