MDX - metadata query
Hi,
Is it possible to use MDX to query the outline and generate a mapping file that returns a list of members and its attribute in a separate column.
I tried to use the DIMENSION PROPERTIES but the output is not really what I expect.
For example:
SELECT
[CUSTOMER].Levels(0).Members DIMENSION PROPERTIES [CUSTOMER].[CUSTOMER SALES REP] ON ROWS,
{[ACCOUNT].[A2_01]} ON COLUMNS
from [FCRSCNPL.PL]
returns something like:
(AMC332 - AMP SHANGHAI LTD.) | (CUSTOMER SALES REP = SR EQ, type: STRING, )
Not really what I have in mind, which should be something like:
AMC332 SR EQ
Note that AMC332 is the member name and AMC332 - AMP SHANGHAI LTD. is the alias
Thanks in advance,
Regis
I did the same thing. I think what we all have accidentally done was select a dimension that we wanted to hide then went to the properties window to set the Visible property. What I just noticed is that if you click on on one of the dimensions while on the Cube Structure tab the properties window does not change to the dimension and the Visible property on the cube gets set to false accidentally. At least that how I ended up doing it. I hope this helps someone else realize how it happened to them.
Similar Messages
-
MDX output query is too large to display
Mdx is truncating our report. What should we do to see the entire report?<BR>We get the following error message at the end of the report: Error 1241172 "MDX output query is too large to display"<BR>Thanks in advance<BR>Sibel
[arbor]@[server]/appl/essbase-> essmsh<BR><BR> Analytic Services MaxL Shell - Release 7.1.5 (ESB7150B045)<BR> (c) Copyright 2000-2005 Hyperion Solutions Corporation.<BR> All rights reserved.<BR><BR>MAXL> login user identified by password on server;<BR><BR> OK/INFO - 1051034 - Logging in user [user].<BR> OK/INFO - 1051035 - Last login on Tuesday, December 05, 2006 10:38:59 AM.<BR> OK/INFO - 1241001 - Logged in to Essbase.<BR><BR>MAXL> spool on to 'test.txt';<BR><BR>MAXL> SELECT Members([Full Year].Levels (0)) on Axis(0), Members([ACCOUNT].[3100010001]) on Axis(1) FROM APP.DB WHERE ([Currency].[Native], [Organization].[Fac-0005], [SCENARIO].[Actual 2006], [DEPARTMENT].[D0301-S0301]);<BR><BR> OK/INFO - 1241150 - MDX Query execution completed.<BR><BR>MAXL> spool off;<BR><BR>MAXL> logout;<BR><BR> User user is logged out<BR><BR>MAXL> exit;<BR><BR> MaxL Shell completed<BR><BR>[arbor]@[server]/appl/essbase-><BR><BR>That is the code we did in MAXL. You can also put in perl as well and run it that way. <BR><BR>How much data are you trying to export out. If it is a lot you might run into the same issue we had of it taking way to long to export the data. We were trying to do a level 0 export using MDX Scripts but it took way to long to export the data. We ended up creating a BSO cube as well as a ASO cube to keep our history data in then did a level 0 export from the BSO cube to get our history.<BR><BR>Justin
-
Metadata query to extract each session run duration for last 10 Runs
Here is the query: Select Subject_Area,Workflow_Name,Task_Name,Instance_Name,Task_Type_Name, Start_Time, End_Time from (Select Subject_Area,Workflow_Name,Task_Name,Instance_Name,Task_Type_Name,Cast(Start_Time As Timestamp) Start_Time, Cast(End_Time As Timestamp) End_Time, rank()over(partition by subject_area,workflow_name,instance_name,task_type_name order by Start_time desc) RFrom Rep_Task_Inst_Run Where Task_Type_Name<>'Start') where R<=10
Hi all, Please help me with metadata query to extract each session RUN_DURTION, Start Time, end time for last 10 runs of each session at a workflow level. I know we can get information from REP_WFLOW_RUN table but i dont know table strucure and I dont have access to Repository database and we need an exact query to raise it to admin team. so please provide me an exact query. Thanks
-
ODI metadata query to find source and Target table for Interface
Hi Experts,
Client is migrating there source from EBS 11.5.10 to R12. They are in ODI BIApps. 7952 version.Since,all there mappings are customized they are not bothering about support from Oracle as far as BIApps is concerned.
Now,we need to know how many ODI mappings will be impacted when source EBS is migrating from 11.5.10 to R12 and so that we can only target those mappings accordingly.
So,please provide me with below inputs:
1) Any metadata query which will give me the source table and target table information's against an interface even-if the main interface source is another interface.
2) What are the other stuffs I need to look from point of view of mapping changes when the source is upgrading.e.g. only source table change is enough or I need to look into other stuffs.I feel,it is boiling down to create a separate source adapter for R12.
Regards,
SnehotoshSELECT C.TABLE_NAME AS "Target Table Name",
A.COL_NAME AS "Target Field Name",
Wm_Concat(G.SOURCE_DT) AS "Target Data Type",
Wm_Concat(G.LONGC) AS "Target Data Length",
Wm_Concat(TXT) AS "Transformation Rule",
Wm_Concat(DISTINCT F.TABLE_NAME) AS "Source Table Name",
Wm_Concat(D.COL_NAME) AS "Source Field Name",
Wm_Concat(D.SOURCE_DT) AS "Source Data Type",
Wm_Concat(D.LONGC) AS "Source Data Length"
FROM
SNP_POP_COL A JOIN SNP_TXT_CROSSR B ON A.I_TXT_MAP=B.I_TXT
JOIN SNP_POP C ON A.I_POP=C.I_POP
JOIN SNP_TXT E ON A.I_TXT_MAP=E.I_TXT AND B.I_TXT=E.I_TXT
LEFT OUTER JOIN SNP_COL D ON B.I_COL=D.I_COL
LEFT OUTER JOIN SNP_TABLE F ON F.I_TABLE= D.I_TABLE
LEFT JOIN SNP_COL G ON A.I_COL=G.I_COL
WHERE POP_NAME = 'XXXXXXX'
GROUP BY C.TABLE_NAME,A.COL_NAME ORDER BY 1 -
Hi all, Please can anybody help me with metadata query to extract all the sessions run duration information (start time and end time, run duration)in each workflow for last 10days.I dont have access to metadata repository so need exact query so that i can raise a request to admin team(he needs exact query). I know that we can get information from REP_WFLOW_RUN , but i dont know the table structure so please provide full query. Thanks,Ravi kumar
Hi all, Please help me with metadata query to extract each session RUN_DURTION, Start Time, end time for last 10 runs of each session at a workflow level. I know we can get information from REP_WFLOW_RUN table but i dont know table strucure and I dont have access to Repository database and we need an exact query to raise it to admin team. so please provide me an exact query. Thanks
-
Problem in consuming BEX query (MDX/Easy Query) in netweaver gateway Odata model
Hi while accessing the the Odata Service URL i am getting the XSLT Runtime error "No Valid Source context supplied" (CX_XSLT_RUNTIME_ERROR). The landscape is SAPUI5 application consumes the bex query as mdx query via Netweaver gateway odata model. Please refer the attached screenshot for details. Thanks, Ganesh.
Issue resolved by setting flags in alias. Ganesh.
-
Hi all
i am getting the fallowing error for the below mdx , what may be the issue?
Query (11, 9) Two sets specified in the function have different dimensionality.
WITH SET LastSample AS TAIL(NONEMPTY([Date].[Hierarchy].members *[Time].[Hierarchy].members,[Measures].[Overall LU SR]))
MEMBER [KPI Name] AS "Overall LU SR"
MEMBER [KPI Value] As KPIValue("Overall LU SR")
MEMBER [KPI Status] AS KPIStatus("Overall LU SR")
MEMBER ObjectName as "Overall LU SR"
MEMBER [Critical Threshold] as [KPI Thresholds].[Threshold1].&[Overall LU SR].member_value
MEMBER [Major Threshold] AS [KPI Thresholds].[Threshold2].&[Overall LU SR].member_value
MEMBER [Minor Threshold] AS 0
MEMBER latestDate as [Date].[Hierarchy].membervalue, format_string = 'mm/dd/YYYY'
MEMBER latestTime as [Time].[Hierarchy].member_caption
SELECT {latestDate,latestTime,ObjectName, [KPI Name], [KPI Value],[KPI Status],[Measures].[Critical Threshold],[Measures].[Major Threshold],[Measures].[Minor Threshold]} ON COLUMNS
,nonempty(LastSample) ON ROWS
FROM [DRA]
Surendra Thotahi all
i got the solution . i have add measures dimension to the name ie ,[Measures].[KPI Name],
WITH SET LastSample AS TAIL(NONEMPTY([Date].[Hierarchy].members *[Time].[Hierarchy].members,[Measures].[Overall LU SR]))
MEMBER [KPI Name] AS "Overall LU"
MEMBER [KPI Value] As KPIValue("Overall LU SR")
MEMBER [KPI Status] AS KPIStatus("Overall LU SR")
MEMBER ObjectName as "Overall LU SR"
MEMBER [Critical Threshold] as [KPI Thresholds].[Threshold1].&[Overall LU SR].member_value
MEMBER [Major Threshold] AS [KPI Thresholds].[Threshold2].&[Overall LU SR].member_value
MEMBER [Minor Threshold] AS 0
MEMBER latestDate as [Date].[Hierarchy].membervalue, format_string = 'mm/dd/YYYY'
MEMBER latestTime as [Time].[Hierarchy].member_caption
SELECT {latestDate,latestTime,ObjectName,[Measures].[KPI Name], [KPI Value],[KPI Status],[Measures].[Critical Threshold],[Measures].[Major Threshold],[Measures].[Minor Threshold]} ON COLUMNS
,nonempty(LastSample) ON ROWS
FROM [DRA]
Surendra Thota -
Cant use dynamic constant for measure MDX SSRS query
I am trying to write a dynamic MDX query in SSRS. I was sucessful with the groups being dynamic,
but the measures are not working as they do in SQL Mgmnt Studio. For example, this text
is not working (the data set is invalid after when executed):
="WITH "
+" member [Measures].[Measure1] AS "+iif(Instr(Join(Parameters!ColumnValues.Label,","),"01") > 0,Parameters!ColumnValues.Value(0),"0")
So if ColumnValue "01" was not selected measure1 should just be "0".
It works ok if you just hard code : "member [Measures].[Measure1] AS 0", but fails when used in the IIF().
Anyone see the problem with this?
Thank YouHi billywinter,
You issue can be caused by the Parameters!ColumnValues.Value(0) will return the integer value which missing the "", so it will cause the issue.
Please modify the query like below to have a test:
="WITH "
+" member [Measures].[Measure1] AS "+iif(Instr(Join(Parameters!ColumnValues.Label,","),"01")
> 0,CStr(Parameters!ColumnValues.Value(0)),"0")
If you still got some issue, please try to provide the error message to help us better analysis about the issue.
Any problem, please feel free to ask.
Regards,
Vicky Liu
Vicky Liu
TechNet Community Support -
Can someone help me as I am now totally confused about metadata. I thought I understood about jpg files. In my catalog settings I have ticked "Include develop settings in metadata inside jpeg"
In this test, I simply changed the tint setting dramtically to make an obvious change to the image. I then closed Lightroom. I then looked at the image in various progs (inc Camera Raw) and none of them show the Green colour. If I re-import into Lightroom, it shows its "normal" colours.
So my understanding that the jpg was updated in real time was completely wrong. Where am I going wrong please.
ThanksAs soon as you pointed out this answer, it was blindingly obvious.
Many thanks for helping a poor idiot to read the screen. I even checked all this when I too the screen grab!!!!!!
Thanks again
Colin -
Hi All
I am new to MDX language and need a MDX functions/query on the cube to get the required output, Given below is the scenario with the data.
I am maintaining the data in a table in dataMart with given structure. We have the data at day and weekly in a single table with granularity indicator and count is the measure group column. While loading the data in to mart table we are populaiting the week
Key from week table and Month key from month table and joining in the cube.
we need to calculate the inventory for a particular month. If a user selects a particular month the output would be count = 30 as a measure called Closed and count = 16 as a measure value called Open.
Need a MDX query to get output.
Granularity Count WeekKey MonthKey
Weekly 16
W1 M1
Weekly 17
W1 M1
Weekly 18
w1 M1
Weekly 19
W1 M1
Weekly 20
W1 M1
Weekly 21
W1 M1
Weekly 22
W1 M1
Weekly 23
w2 M1
Weekly 24
w2 M1
Weekly 25
w2 M1
Weekly 26
w2 M1
Weekly 27
w2 M1
Weekly 28
w2 M1
Weekly 29
w2 M1
Weekly 30
w2 M1
Weekly 16
w3 M1
Weekly 17
w3 M1
Weekly 18
w3 M1
Weekly 19
w3 M1
Weekly 20
w3 M1
Weekly 21
w3 M1
Weekly 22
w3 M1
Weekly 23
w4 M1
Weekly 24
w4 M1
Weekly 25
w4 M1
Weekly 26
w4 M1
Weekly 27
w4 M1
Weekly 28
w4 M1
Weekly 29
w4 M1
Weekly 30
w4 M1
Thanks in advanceHi Venkatesh,
According to your description, you need to count the members with conditions in a particular month, right?
In MDX, we can achieve the requirement by using Count and Filter function, I have tested it on AdventureWorks cube, the sample query below is for you reference.
with member [ConditionalCount]
as
count(filter([Date].[Calendar].[Month].&[2008]&[2].children,[Measures].[Internet Order Count]>50))
select {[Measures].[Internet Order Count],[ConditionalCount]} on 0,
[Date].[Calendar].[Date].members on 1
from
(select [Date].[Calendar].[Month].&[2008]&[2] on 0 from
[Adventure Works]
Reference
http://msdn.microsoft.com/en-us/library/ms144823.aspx
http://msdn.microsoft.com/en-us/library/ms146037.aspx
If this is not what you want, please elaborate your requirement, such as the detail structure of your cube, so that we can make further analysis.
Regards,
Charlie Liao
TechNet Community Support -
When using TODATE function MDX query is not correctly generated
Essbase 9.3.1.2 and OBIEE 10.1.3.4.1.
When using TODATE function MDX query is not correctly generated.
This leads to unexpected values not only on cumulative columns in report (generated with TODATE), but also other columns (calculated with AGO function or directly read from cube) have incorrect values.
The problem occurs when you filter on a column that is not in the select list. If you filter on just one level of dimension, results are fine. You can filter on multiple dimensions as long as you filter on just one level of each dimension.
If you filter on two or more levels of one dimension, than results are not correct. In some cases results for TODATE column are all zeros, in some cases it is a random value returned by Essbase (same random value for all rows of that column), and in some cases BI Server returns an error:
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. Essbase Error: Network error [10054]: Cannot Send Data (HY000).
Here is generated MDX code:
With
set [Grupe proizvoda2] as '{[Grupe proizvoda].[N4]}'
set [Grupe proizvoda4] as 'Generate([Grupe proizvoda2], Descendants([Grupe proizvoda].currentmember, [Grupe proizvoda].Generations(4), leaves))'
set [Segmentacija2] as '{[Segmentacija].[RETAIL]}'
set [Segmentacija4] as 'Filter(Generate({[Segmentacija2]}, Descendants([Segmentacija].currentmember, [Segmentacija].Generations(4),SELF), ALL), ([Segmentacija].CurrentMember IS [Segmentacija].[AFFLUENT]))'
set [Vrijeme3] as '{[Vrijeme].[MJESEC_4_2009]}'
member [Segmentacija].[SegmentacijaCustomGroup]as 'Sum([Segmentacija4])', SOLVE_ORDER = AGGREGATION_SOLVEORDER
member [Accounts].[MS1] as '(ParallelPeriod([Vrijeme].[Gen3,Vrijeme],2,[Vrijeme].currentmember), [Accounts].[Trosak kapitala])'
member [Accounts].[MS2] as '(ParallelPeriod([Vrijeme].[Gen3,Vrijeme],1,[Vrijeme].currentmember), [Accounts].[Trosak kapitala])'
member [Accounts].[MS3] as 'AGGREGATE({PeriodsToDate([Vrijeme].[Gen2,Vrijeme],[Vrijeme].currentmember)}, [Accounts].[Trosak kapitala])'
select
{ [Accounts].[Trosak kapitala],
[Accounts].[MS1],
[Accounts].[MS2],
[Accounts].[MS3]
} on columns,
NON EMPTY {crossjoin ({[Grupe proizvoda4]},{[Vrijeme3]})} properties ANCESTOR_NAMES, GEN_NUMBER on rows
from [NISE.NISE]
where ([Segmentacija].[SegmentacijaCustomGroup])
If you remove part with TODATE function, the results are fine. If you leave TODATE function, OBIEE returns an error mentioned above. If you manually modify variable SOLVE_ORDER and set value to, for example, 100 instead of AGGREGATION_SOLVEORDER, results are OK.
In all cases when this variable was modified in generated MDX, and query manually executed on Essabse, results were OK. This variable seems to be the possible problem.Hi,
Version is
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
PL/SQL Release 10.2.0.5.0 - Production
CORE 10.2.0.5.0 Production
TNS for 64-bit Windows: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production
Sorry, in my last post i forgot to mention that i already created a function based index but still it is not using because, there is a UNIQUE constraint on that column.
Thanks -
Crystal Report on BW BEx Query via MDX in SAP Portal
Hi!
We need to display a CR in the Portal. The CR is based on a MDx BW Query. To create and display the report is no problem. Even saving back to BW is working fine.
But how do we get this CR displayed in the EP?
Thanks in advance
JörnHi,
Should only the BO SAP Integration Kit iViews / URL iViews be used and are the Crystal Report iViews (http://help.sap.com/saphelp_nw04/helpdata/en/36/d4a94076b63713e10000000a155106/frameset.htm) obsolete?
Yes as the Crystal Report iView are based on an older version
If we export the Crystal reports to SAP BW, is it possible to call them with BEx iViews like the xCelsius reports? (Like with DASHBOARD=<report name> for xCelsius)
From where can we get the Crystal Report ID, if we export them to SAP BW?
You should use the BusinessObjects Integration Kit iView template for Crystal REports and the ID can be retrieved from the CMC
Ingo -
Controlling meta data returned by an MDX query
Hello,
I'm retrieving results from Analysis Services then processing them further in SQL via OpenQuery. So I have a query of the form "select * from OpenQuery(LinkedServer, '<mdx>')
The query works fine, but because I have a dimension hierarchy with a seven levels on rows, the result set contains seven columns which I don't need, one column for each level in the hierarchy.
I can ignore them using the syntax "WITH CTE ([1],[2]...) as (<query>) ...", so this doesn't interfere with functionality.
However, I'm wondering if there is some syntax in MDX which will prevent those columns from being returned at all. I'm guessing that regardless of whether they are selected in SQL, that data still has to be processed. The performance impact of this isn't
noticeable on any single query, but it seems like for many queries with many rows it would add up. Is it possible to control the meta data that an MDX result set contains?
Thank you!Hi vercinegetorix,
When we run MDX query by using OPENQUERY having hierarchy, we will get extra columns describing the values of each hierarchy level in different columns. This behavior is by design and we can't change that.
In addition, we may concern the attribute unique name a little long. The easiest way to remove them is to use an alias. For detail information, please refer to the article below:
MDX + T-SQL: Combining relational and multi-dimensional data into one query result set:
http://sqlblogcasts.com/blogs/drjohn/archive/2008/09/27/mdx-and-sql-combining-relational-and-multi-dimensional-data-into-one-query-result-set.aspx
If you have any feedback on our support, please click
here.
Elvis Long
TechNet Community Support -
Is it possible to implement Recursive CTE query in MDX to Cube dataset?
I have data with hierarchical relationship like this:
Release -> Features -> PBI/Bugs -> Tasks/Test Case. I have two datasets Work Item and Work Item Linked to get this hierarchical information.
The data looks like this:
Something like if I pass a Release ID, I need to get all the children and sub-children also. Basically a report like this:
I did this by implementing a recursive CTE query with warehouse tables. But it takes more time to load. SO trying to find the possibility using MDX and querying the cube datasetsHello,
There is nothing stopping you from querying the cache to see what is in it. However, this will only take into account items that are already in the cache. If you need a query to return items that are potentially not in the cache, you need to query the database, have the query return keys, and then request those keys through Coherence - which will in turn pull the items from the database as needed.
Regards,
-Dave -
Show last data 0 in an Input-ready query - Bex
Hi experts,
I have an Input-ready query working ok with IP (Integrated Planning).
The infocube contains information about date/material/stock_quantity (via DTP, date and material, and real-time introduced stock-quantity), the user (via Bex) only introduce the stock quantity.
This is an example of the real-time cube data:
Date Material Quantity
02/03/2011 M1 1000 (input via Input-ready-query)
03/03/2011 M1 0 (planned via DTP)
04/03/2011 M1 0 (planned via DTP)
05/03/2011 M1 200 (input via Input-ready-query)
06/03/2011 M1 50 (input via Input-ready-query)
07/03/2011 M1 0 (planned via DTP)
I want to create a query-workwook that displays: if stock_quant.=0, show the last value <>0 of this material, if stock_quant<>0 it's ok:
Example workbook desired,
02/03/2011 M1 1000
03/03/2011 M1 1000
04/03/2011 M1 1000
05/03/2011 M1 200
06/03/2011 M1 50
07/03/2011 M1 50
Do you know how could I show it via Bex-workbook or other loading way ?
Thanks!!Hi Marcel,
an idea could be to create a virtual key figure and then to use it in the desired bex query. You will need also a way to create an mdx (pre-) query on the fly in order to have the quantity history of the material(s). This is a better approach than reading directly the infocube.
Take a look at the how to guide "How to ... Realize summarized display of stock values on storage location level". The specific scenario is quite similar with your own requirements. You can find the document on URL http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/eb9faa90-0201-0010-cc9c-cd2e6c0a549a
Kind Regards,
Theodoros
Maybe you are looking for
-
Where can I get driver for network scanning on my Laserjet Multifunction M1120n for Windows 7?
Where can I get driver for network scanning on my Laserjet Multifunction M1120n for Windows 7 64bit? It must be the Windows 7 driver of Scanto.msi. Thank you for your support. This question was solved. View Solution.
-
How do I force all url links to open only in Firefox ?
OS : WindowsXP-Prof_SP3 FF version 18.0.2 My default browser is FF, but not quite as expected. Url links appearing Outlook 2010 messages or appearing in website pages are mostly still opening another browser (AvantBrowser) instead of Firefox. How can
-
Transferring info from G4 to mini
I have a G4 and have both system 9.2.1 and 10.3.9 loaded. My hard drive has been making funny noises so I bought a mini to transfer everything over because this was about the same price as getting my current hard drive fixed. I also liked the idea of
-
Possibility of same document number in tables BSAD and BSID
Hi I want to know the possibility of existence of same document number in the tables BSAD and BSID. If it is possible, in which case the same document number exist both in BSAD and BSID.
-
How to show number of replies, views, likes, bookmarks
Is there a way to show the number of replies, number of bookmarks, number of views, number of likes for an individual forum (like Yosemite OS X) like when you click on one of the main categories (Content, Discussions, etc). Have not found any way to