MDX query issue - get key instead of text

Hello,
My BW query contain single row of type 0FUNDS_CTR that should be display key and not text. When query is running from query designer I can see the key in the results.
But, when I try to get the results of MDX statemet on this query I see the text of 0FUNDS_CTR instead of key!
My query is:
SELECT NON EMPTY [[Measures]].MEMBER ON AXIS(0),
NON EMPTY [[0FUNDS_CTR]].MEMBERS ON AXIS(1) FROM
[[MY_CUBE_NAME/MY_QUERY_NAME]]
CELL PROPERTIES CELL_ORDINAL, VALUE, FORMATTED_VALUE
I try to replace VALUE to KEY in
"CELL PROPERTIES CELL_ORDINAL, VALUE, FORMATTED_VALUE" query part and even remove this declaration but there is no effect.
I need to work with MDX statements like this and run them from with BI SDK XMLA Connector.
Any idea?
Thanks,
Ola
Edited by: Ola Agiv on Jul 30, 2008 10:05 AM
Edited by: Ola Agiv on Jul 30, 2008 10:06 AM

Hi Ola,
Regarding your case ..
Could you try to go to your query using ur query designer, then go to 0FUNDS_CTR property.
Set the attribute display as to be KEY.
And run again your MDX.
See the result, whether it change into your expectation / not ??
Hopefully it can help you a lot.
Regards,
Niel.

Similar Messages

  • MDX Query to show the latest product text again historical facts (Type 2 dimenion linking on Surrogate key and also Natural Key)

    I need to write a MDX query to show the latest product text again historical facts or a chosen product text in time. I can write this query in TSQL, but new to MDX.
    The way I do it in TSQL is joining two queries together on the Natural Key as opposed to the surrogate key.
    Can this be done in MDX. I know I could write two separate MDX queries, one which get the product text I wan and the other to get the measure with the actual product text and Natural Key, and use a lookup function in ssrs to show the two result sets I the
    same tablix by looking up the Natural Keys. But this should be able to be done in one query shouldn't it.
    In the dsv the fact knows to join to the dimension using the surrogate key.
    Thanks J

    Hi Jamster,
    According to your description, you want to write a query to show the latest product text, right?
    In MDX, we can use LastNonEmpty function to return the lastest member winth a dimension. LastNonEmpty is an aggregation function available in the Enterprise version of SQL Server. However, you can create your own with a little bit of recursive MDX. Here
    is a sample query for you reference.
    With Member Measures.LastHits as
    iif(isempty(Measures.Hits),
    ([Date].[Year Month Day].prevmember,
    Measures.LastHits
    ),Measures.Hits)
    Reference
    http://cwebbbi.wordpress.com/2011/03/24/last-ever-non-empty-a-new-fast-mdx-approach/
    http://richardlees.blogspot.com/2010/07/getting-last-non-empty-value.html
    If this is not what you want, please provide us the detail structure of your cube and the expected result, so that we can make further analysis and give you the exactly MDX query.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Key instead of text in the variable sclection screen

    Hello Experts,
    please clarify my doubt.
    My user wants to see the key instead of text in variable selection screen (in portal) for material.
    Is it possible to do this?
    Regards
    Prathap.

    Hello!
    I think in the menu there is a point like infoprovider specific properties (or similar) in rsa1. Here you can decide what value is shown. Try this, but I'm not sure that this also work in portal.
    Best regards,
    Peter

  • Show key instead of text in ME51N for PR document type

    Hi, did anyone know how to show key instead of text in ME51N for PR document type? How can I remain the setting after shut down the PC?
    Thanks.

    Can you give more info about your need as it is not clear which text you're referring to.
    Regards,
    Vivek

  • Has anyone had trouble getting hangouts instead of text messages?

    Has anyone had trouble getting text messages.  I am getting hangouts instead of text messages.

    Wife,
    Once you merge SMS and Hangouts, Hangout becomes the default handler of incoming and outgoing SMS. To switch to SMS or Hangouts, click the icon on the left side of the Text box.
    Hope this helps.
    -Chad

  • Key instead of Text in Results Object in Crystal Reports For Enterprise

    Hi All
    I recently developed a report in Crystal Reports for Enterprise and at some point afterwards the text description of the hierarchy used in the report was changed.  The Key remained the same, however this caused the report to crash.  The solution was to click Edit Query Option in the Results Objects and simply come out without changing anything.  This refreshed the results object pane and the report ran as normal.   I work in an environment where the text of hierarchies is liable to change frequently and without notice and it will be unfeasible for me to constantly refresh the results object every time a change to a hierarchy is made.  Therefore is there a way to define in CRE to use the Hierarchy key instead of the text as this is less likely to altered?
    Many Thanks in advance
    Neil

    Excuse me I have my terminologies mixed up, what I mean is the name of the characteristic used in the report.  An example would be a characteristic called with the text of "Material" and a key of "0MATERIAL", if I were to change the text description to "MAT" and the key where to remain the same.  This would cause crystal report to error because it expecting the Characteristic name to be "Material".  Is there a setting or something in CRE to have it default to the key only so if the text of a characteristic or even a key figure for that matter where changed there would be no impact to the Crystal report.
    I hope this makes more sense this time round
    Thanks
    Neil

  • Workbook refresh displays key instead of text

    Hi,
    We are on NW2004S rampup. Our support pack level for Quality environment is 7. When we execute the workbook in management cockpit in transaction UMM_PRES, the calendar month is displayed as text. When we refresh workbooks, the calendar month changes from text to key., like from Jan 2006 - May 2006 to 01/2006 - 05/2006. This happens for every refresh. On the other hand when we log back and display, text is shown and with every subsequent refresh key is displayed. This does not happen in Quality system under 3.0b version. My search on OSS notes does not get any relevant  one. Anyone having similar experience?
    Thanks.
    Param

    Hi David,
    I am able to get the result as text only after each refresh. This is made possible as follows:
    In RSD1, I changed the following under BEX tab.
    Display  changed to Text
    Text type changed to medium type
    The Text type is  new one in 2004S as compared to 3.x.
    Tnx.
    Param

  • Why am i getting fractions instead of text on some webpages?

    i'm getting fractions/mathematical sentences instead of text of some webpages. after reading another post with a similar problem. i did what they said would solve the problem, getting rid of the fonts Helvetica Fractions and Times Phonetic. that didn't work.
    i got rid of those fonts. searched thru my hard drive to make sure there weren't other copies of those fonts on my system, but the fractions still show up on some webpages.
    i restarted after trashing the fonts and did a disk permissions repair. anything else i need to do?

    tom, i'll email you with a screen shot.
    It's helvetica fractions or something similar.
    when i went
    to the fontfinagler download site, the example of
    garbled text was different from what i am
    experiencing.
    That's irrelevant. The point is that your machine may still think you have helvetica fractions because it is still in the caches. Clean them.
    by the way, firefox works fine.
    This font substitution problem normally only affects Apple Cocoa apps like Safari, Mail, Address Book, etc.

  • MDX query To get DateKey based on my Dimension table

    Hi,
    In my Date dimension table DateKey will be 1,2,3,4........
     DateKey 1= 22nd Jan,2010
     DateKey 2= 23rd Jan,2010
     DateKey 3= 24th Jan,2010.
    Now i want to get Today date(Ex.22jan2014) and LastYearSameDay date(Ex.23jan2014) by using mdx query.
    Can you please suggest me.
    Sudhan

    Hi Sudhan,
    According to your description, you want to get Today date and LastYearSameDay date by using mdx query. In this case, you can use Now() function and DateAdd function to get the result. Here is a sample query for your reference.
    WITH MEMBER Measures.Today AS vba!Now(), FORMAT_STRING="Short Date"
    MEMBER Measures.Yesterday AS Dateadd("d",-1,Measures.Today), FORMAT_STRING="Short Date"
    SELECT {Measures.Today,Measures.Yesterday} on 0
    FROM
    [Adventure Works]
    Result:
    Regards,
    Charlie Liao
    TechNet Community Support

  • Display Key instead of Text in filter value

    In BEx excel query, filter is displayed as text instead of key. I've changed the ojects properties to display as Key, but still displays text in query. Is there a way to change this??

    Hi Angie,
    There is no way to change it by way of system settings...

  • Upgrade:Diplayed as key instead of text

    Hi ,
    After upgrade to NetWeaver 2004s reports for a particular characteristic say Version display come as Key value.Before upgrade it was shown as Text. In 0Version InfoObject, the selection is Text.
    Please provide your input.
    Thanks,
    Mayuri

    Hi
    don't worry..change your options for this purticular characterstic in your query..
    display as text/key/key and text.....
    Hope it helps
    Thanks
    Teja

  • BEx Wad 7.0 displays key instead of text when text value is blank

    Hi,
    I have a query which behaves differently in BEx Analyzer and in a Web Template. I have a characteristic which is set to display text and key. The key is "100" and the text field is not filled out in the text table of the characteristic for key value "100".
    In BEx Analyzer, the text field shows a blank value. However, in WAD the text field displays the key which is "100". I need to display the text field as blank in WAD, but it seems like this is not possible. Do you know a way to achieve this?
    I need to export to Excel from WAD, so I guess javascript will not be a proper solution.
    Thanks!
    Best regards,
    Morten

    Hi Angie,
    There is no way to change it by way of system settings...

  • MDX query to get negative measures

    I need to query a cube with all negative
    values, unfortunately I'm new to MDX and find the syntax very alien compared to
    SQL.
    I want to get the sum
    of all negative values from the database.
    SQL would
    be:
    SELECT Desk,Rating_Group, SUM(Value)
    FROM fact
    WHERE
    SUM(Value)<0
    GROUP BY Desk,Rating_Group
    I've tried various ways to
    get the data, but the aggregation does not
    appear to be correct.
    MDX:
    WITH MEMBER [Measures].[Long]
    AS
    IIF(
    [Measures].[Risk Value]<0,
    [Measures].[Risk
    Value],
    NULL)
    SELECT NON EMPTY { [Measures].[Long]} ON COLUMNS,
    NON EMPTY { ([Vdim Curve Family].[Hierarchy].[SP Rating Group]*[Vdim
    Book].[Desk].[Desk].Members) }
    ON ROWS
    FROM [DM]
    What appears to
    be happenning is that the data is being pre-aggregated, so it returns the
    equivalent of the SQL
    SELECT Desk,Rating_Group, SUM(Value)
    FROM
    fact
    GROUP BY Desk,Rating
    HAVING SUM(Value)<0
    I've also tried
    filter, aggregate,sum and all appear to give me the same
    problem.
    Comments gratefully received, thanks if anyone can enlighten
    me.
    I'm considering going back to the view that builds my cube and
    changing it and adding a new measure, but it seems over the top for something
    which is so easy in SQL.

    Thanks for the reply Mosha.
    One of the main benefits of putting the data into a cube is that there are less problems with locking, which is a major problem due to the requirements to run a large number of reports. 
    MDX queries have less performance problems in terms of concurrency and this is my reason for attempting to get the data into a cube.  Going back to SQL would excacerbate the problems I have at the moment (unfortunately politics means that I cannot replace some of the existing data sources with a integration services solution).
    I think my research leads me to believe that my best option will be to go back to my data source views that populate the cube and attempt to use a case statement to populate a negative and positive value fields.
    I'm finding MDX a fustrating experience, the language is very close to SQL, but a lot of the functions do not do what would be obvious to a SQL programmer and there is a steep learning curve as I'm finding 10 years of SQL development is not always helpful.

  • Mdx query to get the last date of every month if the month is current month need current date..

    i have a scenario where i need the data of last date of every month and if the month is current month need current date data...
    is it possible using MDX...

    Hi Shashi,
    According to your description, you want to return the last day for each month except current month, right?
    In MDX, we can use ClosingPeriod function to return the member that is the last sibling among the descendants of a specified member at a specified level, here is a sample query for you reference.
    with member [measures].[a]
    as
    ClosingPeriod ([Date].[Calendar].[Date],[Date].[Calendar].currentmember).name
    select {[measures].[a]} on 0,
    [Date].[Calendar].[Month].members on 1
    from
    [Adventure Works]
    And then use the IIF function to evaluate if the month is current month. Please refer to the links below.
    http://msdn.microsoft.com/en-us/library/ms145584.aspxhttp://msdn.microsoft.com/en-IN/library/ms145994.aspx
    Regards,
    Charlie Liao
    TechNet Community Support

  • Getting boxes instead of text in documents.  IS THERE A WAY TO ACTUALLY SPEAK WITH SOMEONE AT ADOBE?

    This is ridiculous.  Navigating the website, looking for that elusive telephone number for help.  I don't know what wrong with Adobe's 10 flash player program and why it isn't working with my Windows 8 program.  The Windows 8 test says I'm good to go, but obviously, that's not the case.  Are there any people on the other side of this "help" portal?

    There are, but there's going to be a fee for the support call.  If you want to continue down that path, here's the phone number.
    800-833-6687
    If you'd like help from one of the community experts, I'd recommend posting exactly what's going on, what steps you're taking, what URL's you are having problems with, etc. My guess is someone will be able to lend a hand for free.

Maybe you are looking for