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
-
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 JHi 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
NeilExcuse 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.
ParamHi 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.
SudhanHi 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,
MayuriHi
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,
MortenHi 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. -
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 -
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
-
Is there another way to close apps other than deleting them from the multitask bar.....I have a small crack in the bottom of my screen and that part of the screen does not recognize the touch.
-
Windows don't see my Sound Blaster card after moving it to a different PCI sl
Hi there, MY CARD IS THE: Sound Blaster XF-I Xtreme Music ============================== MY PROBLEM IS AS FOLLOWS ============================== My sound blaster card was working properly during year, but... [color="#ff0000"]when I changed it to a di
-
Why am I suddenly getting a strange banding effect when printing.
I've been using Adobe Photoshop CS5 for the last two years and I've started getting a strange banding effect on my prints. Photoshop seems to be the only application that is effected. I print on a large format printer, my drivers are up to date, if
-
How to get the Newly added fileds from Oracle to BW
Hi , We have created the view in the DB side and extracted the data to BW side. After that in the DB side they have added new filed. I want to extract the data for that filed also. But that filed is not displaying in the data source itself. We have d
-
Strange query behavior when displayed in browser.
Hi gurus, when I open a query in browser on one of the computers, I get no detailed cells, just the overall result. No matter, if I open the query in Portal, or in BEx Web Analyzer. When I use BEx Analyzer, everything seems to be fine. When I open th