Active Form - TM1RPTROW MDX issue

Post Reply
jamesbennett
Posts: 28
Joined: Wed Aug 08, 2018 10:01 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2
Excel Version: 2016

Active Form - TM1RPTROW MDX issue

Post by jamesbennett »

Hi there,

I've set up an Active Form that I have published through TM1 Web. I have the original TM1RPTROW formula as follows:

Code: Select all

=TM1RPTROW($B$9,"server:Global Orgstructure","n-level","","Code and Name",0)
I inserted an MDX formula into cell C14:

Code: Select all

="{TM1FILTERBYLEVEL({DESCENDANTS([Global Orgstructure].[4D])},0)}"
and updated the TM1RPTROW formula to be as follows:

Code: Select all

=TM1RPTROW($B$9,"server:Global Orgstructure","n-level","","Code and Name",0,$C$14)
This works exactly as intended, to give me all leaf-level elements within the 4D consolidation.

However, when I try to make the MDX dynamic, so instead of hard-coding 4D I reference another cell that evaluates to 4D, the TM1RPTROW formula breaks and I get no data appearing.

Dynamic MDX:

Code: Select all

="{TM1FILTERBYLEVEL({DESCENDANTS([Global Orgstructure].["&$C$13&"])},0)}"
So you see the only thing I have changed is replacing "4D" with a reference to cell $C$13, which evaluates in Excel as "4D". Yet the hard-coded version works and the cell-referenced version does not. Am I missing something obvious?

I got it working earlier with the dynamic reference, and I'm fairly sure I haven't changed anything in the meantime that would cause it to break...
Last edited by jamesbennett on Fri Aug 23, 2019 12:31 pm, edited 1 time in total.
User avatar
orlando
Community Contributor
Posts: 167
Joined: Fri Aug 04, 2017 8:27 am
OLAP Product: TM1
Version: PAL 2.0.8
Excel Version: Office 365

Re: Active Form - TM1RPTROW MDX issue

Post by orlando »

Hi,

i always build the MDX Query in a Excel cell (with reference etc...)
In TM1RPTROW i only refer to the cell.
My TM1RPTRow looks like that:

Code: Select all

=TM1RPTROW($B$9;"MyServer:TM1User";;;"Name";;$G$14)
Maybe that helps
Best regards
orlando
jamesbennett
Posts: 28
Joined: Wed Aug 08, 2018 10:01 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2
Excel Version: 2016

Re: Active Form - TM1RPTROW MDX issue

Post by jamesbennett »

orlando wrote: Fri Aug 23, 2019 11:56 am Hi,

i always build the MDX Query in a Excel cell (with reference etc...)
In TM1RPTROW i only refer to the cell.
My TM1RPTRow looks like that:

Code: Select all

=TM1RPTROW($B$9;"MyServer:TM1User";;;"Name";;$G$14)
Maybe that helps
Best regards
orlando
Thanks, that is what I've been doing - apologies I missed that step from the OP. Any idea why it might not be working with the cell reference in the MDX?
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Active Form - TM1RPTROW MDX issue

Post by tomok »

It looks like you have both a subset parameter AND an MDX formula parameter in your TM1RPTROW formula. This is really an either/or thing. TM1 either uses the subset or the MDX, it can't use both. Perhaps it uses the MDX parameter over the subset one as long as it can be evaluated easily but once you add another level, by using a cell reference, it breaks. Just a guess. I always make sure I use EITHER a subset or MDX parameter. Never both.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
jamesbennett
Posts: 28
Joined: Wed Aug 08, 2018 10:01 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2
Excel Version: 2016

Re: Active Form - TM1RPTROW MDX issue

Post by jamesbennett »

tomok wrote: Fri Aug 23, 2019 12:47 pm It looks like you have both a subset parameter AND an MDX formula parameter in your TM1RPTROW formula. This is really an either/or thing. TM1 either uses the subset or the MDX, it can't use both. Perhaps it uses the MDX parameter over the subset one as long as it can be evaluated easily but once you add another level, by using a cell reference, it breaks. Just a guess. I always make sure I use EITHER a subset or MDX parameter. Never both.
Thanks, that's a valid guess and makes sense. I've taken out the subset so my formula is just:

Code: Select all

=TM1RPTROW($B$9,"server:Global Orgstructure","","","Code and Name",0,$C$14)
i.e. just referencing the MDX formula

However nothing changes - still it doesn't update the active form unless I replace the cell reference in the MDX formula with hard-coding.

Edit: Updating my MDX formula to remove all cell references from it (but including the formulae it draws on) still produces no data:

Code: Select all

="{TM1FILTERBYLEVEL({DESCENDANTS([Global Orgstructure].["&DBRW("server:}ElementAttributes_}Clients",TM1USER("server"),"OrgStructureSubset")&"])},0)}"
User avatar
orlando
Community Contributor
Posts: 167
Joined: Fri Aug 04, 2017 8:27 am
OLAP Product: TM1
Version: PAL 2.0.8
Excel Version: Office 365

Re: Active Form - TM1RPTROW MDX issue

Post by orlando »

jamesbennett wrote: Fri Aug 23, 2019 12:51 pm

Code: Select all

=TM1RPTROW($B$9,"server:Global Orgstructure","","","Code and Name",0,$C$14)
i.e. just referencing the MDX formula

However nothing changes - still it doesn't update the active form unless I replace the cell reference in the MDX formula with hard-coding.

Edit: Updating my MDX formula to remove all cell references from it (but including the formulae it draws on) still produces no data:

Code: Select all

="{TM1FILTERBYLEVEL({DESCENDANTS([Global Orgstructure].["&DBRW("server:}ElementAttributes_}Clients",TM1USER("server"),"OrgStructureSubset")&"])},0)}"
Dows yor MDX work in SubsetEditor?
Wim Gielis
MVP
Posts: 3234
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Active Form - TM1RPTROW MDX issue

Post by Wim Gielis »

And try DBR instead of DBRW.
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
jamesbennett
Posts: 28
Joined: Wed Aug 08, 2018 10:01 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2
Excel Version: 2016

Re: Active Form - TM1RPTROW MDX issue

Post by jamesbennett »

Wim Gielis wrote: Fri Aug 23, 2019 1:15 pm And try DBR instead of DBRW.
Changing the DBRW to DBR seems to work. So my next question is why would that be? I understood DBRW was generally higher-performance than DBR.

Could that be why (using DBRW) the active form is evaluating in TM1 Web, but not in Perspectives? That the data can still be drawn through (as the formulae are valid) but Perspectives can't handle it, whilst TM1 Web can?
Wim Gielis
MVP
Posts: 3234
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Active Form - TM1RPTROW MDX issue

Post by Wim Gielis »

Please use the search function and Google, this topic has been discussed many times and is perceived as basic knowledge for somewhat more advanced TM1 users.
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Active Form - TM1RPTROW MDX issue

Post by tomok »

I HIGHLY recommend you Google and read about the difference between DBR and DBRW. It's must have knowledge if you work with TM1.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Post Reply