MDX which takes Value from Cube

Post Reply
EP_explorer
Regular Participant
Posts: 200
Joined: Sat Dec 04, 2010 2:35 pm
OLAP Product: PAL
Version: 2.0.9
Excel Version: 2016

MDX which takes Value from Cube

Post by EP_explorer »

Dimension Periods.
Jan, Feb, Mar, Apr

Cube A with 2 dimensions
dimension X (contains 1 element X1)
dimension Y (contains 1 element Y1)

In Cube A in put one value - Jan

How I can write MDX expression which return value from Cube A (Jan)
I tried something like
{[Periods].[Cube A.([X][X1],[Y].[Y1])]}
but without result.

Can you help me?
declanr
MVP
Posts: 1815
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: MDX which takes Value from Cube

Post by declanr »

Code: Select all

{StrToMember("[Periods].[" + [CubeA].([Dim1].[Element1],[Dim2].[Element2],...) + "]" )}
Declan Rodger
Edward Stuart
Community Contributor
Posts: 247
Joined: Tue Nov 01, 2011 10:31 am
OLAP Product: TM1
Version: All
Excel Version: All
Location: Manchester
Contact:

Re: MDX which takes Value from Cube

Post by Edward Stuart »

Spend some time with the TM1 MDX Primer:

http://www.bihints.com/book/export/html/68

and the MDX Function Support section of the reference guide

https://www.ibm.com/support/knowledgece ... ort_N20006

It all comes down to what you are actually trying to do, return a value in the cube viewer? or via an external tool?
EP_explorer
Regular Participant
Posts: 200
Joined: Sat Dec 04, 2010 2:35 pm
OLAP Product: PAL
Version: 2.0.9
Excel Version: 2016

Re: MDX which takes Value from Cube

Post by EP_explorer »

declanr wrote: Wed Jul 19, 2017 2:19 pm

Code: Select all

{StrToMember("[Periods].[" + [CubeA].([Dim1].[Element1],[Dim2].[Element2],...) + "]" )}
Thank you. it works.
chalvax
Posts: 1
Joined: Fri Jul 28, 2023 12:19 pm
OLAP Product: TM1
Version: 11.8.1300.1
Excel Version: Version 2306

Re: MDX which takes Value from Cube

Post by chalvax »

Edward Stuart wrote: Wed Jul 19, 2017 2:26 pm Spend some time with the TM1 MDX Primer:

http://www.bihints.com/book/export/html/68

and the MDX Function Support section of the reference guide

https://www.ibm.com/support/knowledgece ... ort_N20006

It all comes down to what you are actually trying to do, return a value in the cube viewer? or via an external tool?
Sorry but I have to comment on your answer, Mr. Stuart.
Luckily there are other users' who give a helpful, real and direct answer to the question of an user. I had the same problem like EP_Explorer. The simple case of a syntactic error. A missing double quote respectively the doublequote on the wrong position. So the answer of declaner worked. Your's sounds pretty - let's say - prejorative in just telling somebody something like "start learning mdx, we don't have time for such beginner's questions". I guess you pretty well knew, what the problem was! Well, but maybe I'm wrong, then I apologize for this appraisal. And by the way, the IBM Documentation is very often of little or no help! It just gives a listing of supported MDX commands without any examples how to use them! And by the way what did you mean by 'It all comes down to what you are actually trying to do, return a value in the cube viewer? or via an external tool?' What makes the difference?
MarenC
Regular Participant
Posts: 346
Joined: Sat Jun 08, 2019 9:55 am
OLAP Product: Planning Analytics
Version: Planning Analytics 2.0
Excel Version: Excel 2016

Re: MDX which takes Value from Cube

Post by MarenC »

Sorry but I just had to comment on your comment Mr Chalvax,

What kind of arrogant fool would take issue at beginners being given a direct link to very useful help guides, which would further their knowledge, and set them on the path to self improvement and discovery, especially as the direct answer had already been given?

The useful help guides being the BI hints, not the IBM stuff, I will grant you that :D

Maren
Edward Stuart
Community Contributor
Posts: 247
Joined: Tue Nov 01, 2011 10:31 am
OLAP Product: TM1
Version: All
Excel Version: All
Location: Manchester
Contact:

Re: MDX which takes Value from Cube

Post by Edward Stuart »

Wim's excellent MDX reference guide:
https://www.wimgielis.com/tm1_mdxstatements_EN.htm

George's excellent MDX reference guide:
https://community.ibm.com/community/use ... 4eda43146b

Be part of the solution, not part of the problem
lotsaram
MVP
Posts: 3651
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: MDX which takes Value from Cube

Post by lotsaram »

Why would a new user with no post history necromance a thread from 6 years ago just to troll someone? Very weird stuff. Maybe it's a chatbot/trollbot?
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
MarenC
Regular Participant
Posts: 346
Joined: Sat Jun 08, 2019 9:55 am
OLAP Product: Planning Analytics
Version: Planning Analytics 2.0
Excel Version: Excel 2016

Re: MDX which takes Value from Cube

Post by MarenC »

If its a chatbox it passed my Turing test :lol:
User avatar
WilliamSmith
Posts: 37
Joined: Tue Dec 13, 2022 8:54 pm
OLAP Product: TM1 / PA / PAx / PAW
Version: TM1 11
Excel Version: 365

Re: MDX which takes Value from Cube

Post by WilliamSmith »

Anyway... while we're here in 2023... using ChatGPT to help generate, as well as breakdown and understand MDX statements is invaluable. It also knows Turbo Integrator and rule/feeder syntax! :lol:
Wim Gielis
MVP
Posts: 3105
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: MDX which takes Value from Cube

Post by Wim Gielis »

WilliamSmith wrote: Wed Sep 06, 2023 3:43 pm Anyway... while we're here in 2023... using ChatGPT to help generate, as well as breakdown and understand MDX statements is invaluable. It also knows Turbo Integrator and rule/feeder syntax! :lol:
Like the CubeNext function in TI 😅😅😅
Best regards,

Wim Gielis

IBM Champion 2024
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
User avatar
WilliamSmith
Posts: 37
Joined: Tue Dec 13, 2022 8:54 pm
OLAP Product: TM1 / PA / PAx / PAW
Version: TM1 11
Excel Version: 365

Re: MDX which takes Value from Cube

Post by WilliamSmith »

I guess the only gatekeeping now is to have functionality entirely undocumented! lol..
Adam
Posts: 94
Joined: Wed Apr 03, 2019 12:10 am
OLAP Product: IBM PA
Version: 2.0.9.x
Excel Version: Microsoft 365 x64

Re: MDX which takes Value from Cube

Post by Adam »

lotsaram wrote: Wed Sep 06, 2023 11:07 am Why would a new user with no post history necromance a thread from 6 years ago just to troll someone? Very weird stuff. Maybe it's a chatbot/trollbot?
Was thinking the same thing.
Wim Gielis wrote: Wed Sep 06, 2023 4:10 pm
Like the CubeNext function in TI 😅😅😅
Did someone ask for me? :D
Take care.
Adam
Post Reply