Page 1 of 1
MDX which takes Value from Cube
Posted: Wed Jul 19, 2017 2:07 pm
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?
Re: MDX which takes Value from Cube
Posted: Wed Jul 19, 2017 2:19 pm
by declanr
Code: Select all
{StrToMember("[Periods].[" + [CubeA].([Dim1].[Element1],[Dim2].[Element2],...) + "]" )}
Re: MDX which takes Value from Cube
Posted: Wed Jul 19, 2017 2:26 pm
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?
Re: MDX which takes Value from Cube
Posted: Thu Jul 20, 2017 8:03 am
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.
Re: MDX which takes Value from Cube
Posted: Tue Sep 05, 2023 5:38 am
by chalvax
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?
Re: MDX which takes Value from Cube
Posted: Tue Sep 05, 2023 7:13 am
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
Maren
Re: MDX which takes Value from Cube
Posted: Tue Sep 05, 2023 2:41 pm
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
Re: MDX which takes Value from Cube
Posted: Wed Sep 06, 2023 11:07 am
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?
Re: MDX which takes Value from Cube
Posted: Wed Sep 06, 2023 12:22 pm
by MarenC
If its a chatbox it passed my Turing test
Re: MDX which takes Value from Cube
Posted: Wed Sep 06, 2023 3:43 pm
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!
Re: MDX which takes Value from Cube
Posted: Wed Sep 06, 2023 4:10 pm
by Wim Gielis
Re: MDX which takes Value from Cube
Posted: Wed Sep 06, 2023 6:23 pm
by WilliamSmith
I guess the only gatekeeping now is to have functionality entirely undocumented! lol..
Re: MDX which takes Value from Cube
Posted: Wed Sep 06, 2023 11:06 pm
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.
Did someone ask for me?