MDX Hierarchy
Hi ,
I need one mdx query for below requirement.
I have one custom hierarchy which contains two levels as below.
Country State
A ab
B bc
C ab
In above example we have ab States in two countries like A and C .
when I filter data with the A, ab i am getting output A, ab ,other ab state in C . but I need output A,ab(because i am passing A,ab only).I have only Names,keys not there.
I tried with below query,i am not getting exact output.
SELECT {
}on columns,
FILTER([Product].[Product Categories].Members, [Product].[Product Categories].CurrentMember.Name = "A"
or [Product].[Product Categories].CurrentMember.Name = "ab"
ON ROWS
FROM [Adventure Works]
Coul you please help me.
indu
I tried with "AND",but it is not returning any thing.
SELECT {
}on columns,
FILTER([Product].[Product Categories].Members, [Product].[Product Categories].CurrentMember.Name = "A"
AND [Product].[Product Categories].CurrentMember.Name
= "ab"
ON ROWS
FROM [Adventure Works]
Note:that Hierarchy is self referenced hierachy.
Could you please give me exact solution.
indu
Similar Messages
-
Hi,
I want to extarct the hierarchy underneath [LEVEL01, I am writting a following mdx query but it gives my the result of all the nodes under LEVEL01 whereas I want to extract only specific (lets assume A) under [LEVEL01], has anybody worked on extracting hierarchies from mdx.
SELECT
[Measures].MEMBERS ON COLUMNS,
[[0PROFIT_CTR UK BW1].[LEVEL01].MEMBERS ON AXIS(1)
FROM ZCP_CUBE/ZORB_1
SAP VARIABLES [0S_SHIPT] INCLUDING " "
Thanks for the help.
Regards
SShi,
try
SELECT
[Measures].MEMBERS ON COLUMNS,
[[0PROFIT_CTR UK BW1]<b>.[A]</b> ON AXIS(1)
FROM ZCP_CUBE/ZORB_1
SAP VARIABLES [0S_SHIPT] INCLUDING " "
transaction mdxtest can help in syntax, by drag the object name, choose the cube and query name, all available objects -dimensions (incl. 'hierarchies','properties' ), key figures, variables, functions etc -
Except function with parent child hierarchy using mdx query
HI,
I need to remove some items using mdx query in parent child hierarchy.
I tried with below query,it is not removeing ,could you please help me.
SELECT
{[Measures].[Amount]} ON
COLUMNS
NonEmpty([Account].[Accounts].[Account Level 01],[Measures].[Amount])
ON ROWS
FROM (SELECT
-Descendants({[Account].[Accounts].&[47]},,Leaves)
} ON COLUMNS
FROM [Adventure Works])
induHi Indu,
Why do you remove some itmes using
Descendants function? Generally, we use FILTER function to achieve the requirement.
WITH SET [CustomAccounts] AS
FILTER ([Account].[Accounts].[Account Level 01].Members , [Account].[Accounts].CurrentMember.Name<>'Net Income')
SELECT {[Measures].[Internet Sales Amount]} ON 0
[CustomAccounts] ON 1
FROM [Adventure Works]
WITH SET [CustomAccounts] AS
FILTER ([Account].[Accounts].[Account Level 01].Members , [Account].[Accounts].CurrentMember.Name='Net Income')
SET [RemainingAccount] AS
[Account].[Accounts].[Account Level 01]- [CustomAccounts]
SELECT {[Measures].[Reseller Sales Amount]} ON 0
[RemainingAccount] ON 1
FROM [Adventure Works]
Results.
References.
http://www.databasejournal.com/features/mssql/article.php/3306101/MDX-Essentials-Basic-Set-Functions-The-Filter-Function.htm
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/c0149678-97f2-4066-903f-7f9e9ff09b56/filtering-out-dimension-members-with-mdx?forum=sqlanalysisservices
Regards,
Charlie Liao
If you have any feedback on our support,
please click here.
Charlie Liao
TechNet Community Support -
Hi all
I have a date dimension that (type time) with attributes
- [FiscalYear] (type years)
- [FiscalMonth] (type months)
- [FiscalWeek] (type weeks)
In addition to the attributes used in the natural hierarchy, I have an attribute [PerType] containing one member comming from the relational table 'WTD' which corresponds to 'Current Date'. All other members of this attribute hierarchy are calculated members (defined in the MDX script). Examples:
--Last year
CREATE MEMBER CURRENTCUBE.[Date].[PerType].[LY] AS NULL,
VISIBLE = 1;
SCOPE([Date].[PerType].[LY]);
SCOPE(DESCENDANTS([Date].[Fiscal].[All], [Date].[Fiscal].[Year], SELF_AND_AFTER));
THIS = ([Measures].CurrentMember, [Date].[PerType].[WTD], ParallelPeriod([Date].[Fiscal].[Year], 1));
END SCOPE;
END SCOPE;
--Month to date
CREATE MEMBER CURRENTCUBE.[Date].[PerType].[MTD] AS NULL,
VISIBLE = 1;
SCOPE([Date].[PerType].[MTD]);
SCOPE(DESCENDANTS([Date].[Fiscal].[All], [Date].[Fiscal].[Week], SELF_AND_AFTER));
THIS = Aggregate(CrossJoin({[Date].[PerType].[WTD]}, MTD([Date].[Fiscal].CurrentMember)));
END SCOPE;
END SCOPE;
--Year to date
CREATE MEMBER CURRENTCUBE.[Date].[PerType].[YTD] AS NULL,
VISIBLE = 1;
SCOPE([Date].[PerType].[YTD]);
SCOPE(DESCENDANTS([Date].[Fiscal].[All], [Date].[Fiscal].[Period], SELF_AND_AFTER));
THIS = Aggregate(CrossJoin({[Date].[PerType].[WTD]}, YTD([Date].[Fiscal].CurrentMember)));
END SCOPE;
END SCOPE;
The defalut member of FiscalWeek attribute hierarchy is set dynamically in the MDX script:
ALTER CUBE CURRENTCUBE UPDATE DIMENSION [Date].[FiscalWeek], DEFAULT_MEMBER =
Filter(
[Date].[FiscalWeek].Members,
[Date].[FiscalWeek].Properties( "FiscalWeekStartDate", TYPED) <= DateAdd("d", -2, CDate(CStr(Month(Now())) + "/" + CStr(Day(Now())) + "/" + CStr(Year(Now()))))
AND
[Date].[FiscalWeek].Properties( "FiscalWeekEndDate", TYPED) >= DateAdd("d", -2, CDate(CStr(Month(Now())) + "/" + CStr(Day(Now())) + "/" + CStr(Year(Now()))))
)(0).PrevMember;
If I run the following query:
with member
measures.x as [Date].[Fiscal].DefaultMember.Name
measures.y as [Date].[FiscalWeek].DefaultMember.Name
select
measures.x,
measures.y
} on axis(0)
from [GLWeekly]
it gives me back correctly the default member set over the MDX script.
I order the statements in the MDX Script so that the default period (week) is set at the beginning of the script (just after the calculate).
I do not understand why creating the following calculated member I am obliged to specify [Date].[Fiscal].CurrentMember in the tuple to have correct results:
MEMBER [Account].[CoA].[Standard Engagement Revenue (MTD)] AS ([Account].[CoA].[Standard Engagement Revenue], [Date].[PerType].[MTD], [Date].[Fiscal].CurrentMember)
I would expect that:
([Account].[CoA].[Standard Engagement Revenue], [Date].[PerType].[MTD])
is sufficient.
If the default week is specified in the slicer using a member of the natural hierachy (=> [Date].[Fiscal].x) it works.
Why can't SSAS use the default member if it is must defined in the MDX script?
Can someone explains me this. Thanks a lot in advance.Hi Ina,
have you thought about adding a dynamic statement inside the MDX script? You could define the default member like this:
... DEFAULT_MEMBER = iif( Day( Now() ) = 3, <expression for previous month>, <expression for current month> );
This way you don't need to change it everytime by running a script.
By the way, what do you mean it doesn't update the default member? When you execute this MDX what does it says?
with member measures.x as [Dimension].[HierarchyName].DefaultMember.Name
select { measures.x } on 0 from Cubename
If this returns the correct name, then the problem is somewhere else. I believe it should return you the correct name. Look here, test this on Adventure Works, statement by statement and see what happens.
ALTER
CUBE [Adventure Works]
UPDATE
DIMENSION [Product].[Product Categories],
DEFAULT_MEMBER = [Product].[Product Categories].[Category].&[1]
with
member measures.x
as [Product].[Product Categories].DefaultMember.Name
select measures.x on 0
from [Adventure Works]
ALTER
CUBE [Adventure Works]
UPDATE
DIMENSION [Product].[Product Categories],
DEFAULT_MEMBER = [Product].[Product Categories].[All Products]
with
member measures.x
as [Product].[Product Categories].DefaultMember.Name
select measures.x on 0
from [Adventure Works]
I think you can see which members are default (on related hierarchies) using
MDX Studio. This should help you detect which attributes have not moved accordingly and hence cause problems in your report. The usual suspects are those attributes used in your last month reports. If that's too much for you, just copy paste the definition
of the measure x and use .CurrentMember instead .DefaultMember. And so for all related hierarchies of your dimension. You can run it as one query, just put enough measures (x1, x2, ...), one for each hierarchy, ok?
Here's a test for Day():
with
member measures.y
as
iif( Day(Now()) = 28, 'Yes', 'No' )
select
measures.y on 0
from [Adventure Works]
Today this returns Yes, tomorrow it will be No.
Ups, I just checked one more thing. When you run the script, it sets the default member only for that session. If you execute the first two of the four statements that I've sent you, it will set the default member on Bikes and show you that.
But, if you open another query windows and execute that select statement (only), you'll see All member instead. So, it has set it to Bikes only for the currect session. Consequence? You reports are not aware of it. So, better use dynamic statement in
your MDX script.
Regards,
Tomislav Piasevoli
Business Intelligence Specialist
www.softpro.hr -
Hi,
I have a problem with querying a BEx query cube by MDX. The BEx query contains an external hierarchy that facilitates MDX functions such as Generate(). The MDX query is working in MDXTEST transaction code in BW system. However the error - "system error in program cl_rsr_mdx_soap_handler... The server sent an unrecognizable response." is raised when trying it through XMLA provider from Microsoft Reporting Services. For other BEx queries that don't have external hierarchy, the Reporting Services can successfully query them via XMLA.
Does anyone know what the issue is?
Thanks a lot,
===================================
The server sent an unrecognizable response. (Microsoft Visual Studio)
Program Location:
at Microsoft.ReportingServices.XmlaClient.AdomdDataReader.CompletePreviousRow()
at Microsoft.ReportingServices.XmlaClient.AdomdDataReader.InternalRead()
at Microsoft.ReportingServices.XmlaClient.AdomdDataReader.Read()
at Microsoft.ReportingServices.QueryDesigners.SapBw.Controls.QueryBuilderClientControl.QueryExec.ThreadExecution()
Edited by: huaxianz on Mar 30, 2011 6:12 AMHello Shashi,
derivation can only work, when Profit Center Group is not in the aggregation level. When you have more than one hierarchy on Profit Center (you are using in queries) I suggest that you create one hierarchy on Profit Center with Profit Center Group as foreign characteristics to be used in characteristic relationships. This is then a fixed hierarchy that defines what can be derived from Profit Center for all hierarchies you are using in queries.
Then you need no exit implementation. In addition, the hierarchy used in the characteristic relationship defines the admissible combinations in the cube. The hierarchies used in the query are only views on the cube data, in fact the foreign characteristics in hierarchies used in queries are treated as text nodes.
Regards,
Gregor -
0WBS_ELEMT hierarchy through MDX universe populating random values in WebI
Hi Experts,
We are facing an issue in WebI 3.1, while creating a report on top of MDX universe with 0WBS_ELEMT hierarchy - coming from BEx query. All other hierarchies in other reports are working fine, but the issue seems to be particular to 0WBS_ELEMT hierarchy.
First of all, the WebI does not includes full project entries along with WBS hierarchy - this could be a limitation (2nd comment in https://cw.sdn.sap.com/cw/ideas/2084#comment-14280), and we found workaround as to display in seperate block.
Now the actual issue is, even hierarchy nodes of WBS element are not coming properly in the WebI. There are 5 nodes in universe (L00 to L04). We dragged all of them into the report and found that some nodes are missing. These are the L01 nodes which are not having any subordinate nodes.
Tried different combitions, and later found that if we are not keeping the nodes L02 to L04 in the query, all missing entries (in first report) are coming, but now some other nodes are getting dissapeared.
Can anyone tell the reason and/or solution for the issue. Is this the known issue with 0WBS_ELEMT hierarchy? If so, what SAP is recommending for this? This is really urgent, reply.
Regards,
KshiteeshHi Henry,
Thanks for reply.
We are on BI 7.1 SP 07. We are having other hierarchies working in expected manner, but only WBS element hierarchy is having issue.
After posting to SDN, I saw some other posts on the forum and checked the note 1446246. This note points to others notes, and 2 notes (0001562173 - flattening unbalanced hierarchies & 1432162 - MDX Flattening problems when using hierarchies) which seems to be relevant.
It seems to be case of unbalanced hierarchies, but to be sure please suggest if we can go with these notes.
Regards,
Kshiteesh -
Inclue children and exclue children in a single hierarchy in parent child dimension in mdx
hi,
include children and exclude children in a single hierarchy in parent child dimension in mdx
*12-parent
**20-parent
- 9-parent
--250-child1
--210-child2
--240-child3
aggregation of 12-parent only
aggregation of 20-parent only
aggregation of 9 with children
regards,
ManishHi manishcal16PPS,
According to your description, you have a parent child dimension in your cube. Now you want to use one measure use show aggregation value including/excluding child member based on different parent level member. Right?
In this scenario, we could use IIF() in the calculated measure to apply different calculation depends on the current dimension member. Please refer to query below:
with member [x] as
IIF([Dim].[Hierarchy].CurrentMember is [Dim].[Hierarchy].[Parent].&[9]
sum(Descendants([Dim].[Hierarchy].CurrentMember,
[Date].[Calendar].[Parent]),
[Measures].[Amount])
sum([Dim].[Hierarchy].CurrentMember,[Measures].[Amount])
select [x] on 0,
[Date].[Calendar].[Parent].members on 1
from
[Cube]
Best Regards,
Simon Hou
TechNet Community Support -
Extract Data in Power Pivot from MDX with diffrentnt different Level of Hierarchy in MDX
Hi All,
My requirement is to extract the data form tabular model and put in power pivot,as all the measures calculation is present in model just extracting the aggregated data.
Issue is appearing on Rolling up the data, so is there any way to extract the data so that it will display the right data on different level. As per the below example on level 2 data is getting summed up which is not correct.
Ex:-
Level1
A
10%
B
20%
Level2
30%
Thanks ChandanHi Chandan,
According to your description, you create a SQL Server Analysis Services Tabular model and extract Data in Power Pivot from MDX, the problem is that the hierarchy data rolling up base on the hierarchy level, right?
I have tested it on my local environment, we cannot reproduce this issue. So as per my understanding, the issue can be cause by the hierarchy setting in your tabular model. Here are some links about how to create and manage hierarchies in a tabular model,
please refer to the links and check if the settings are correct.
http://msdn.microsoft.com/en-in/library/hh213003.aspx
http://www.youtube.com/watch?v=qKKNY1Vj_2c
If the issue persists, please provide us more information about you hierarchy creation steps, so that we can make further analysis.
Regards,
Charlie Liao
TechNet Community Support -
Advise on median MDX query and/or dimension hierarchy setup
Hey guys,
I have a fairly weird situation with SSAS/Dimension Hierarchies and an MDX based median-calculation that is actually not working as I would like it to work.
Hierarchy
- State
- County
- Town
- Neighborhood
- Filing Date
- Usage Category
- TransactionID (PRIMARY KEY)
I have a hierarchy set up which shall be used in order drill down the cube. The median, which shall be calculated based off the Sales Price measure and all the affected records, shall be available at every single level of the hierarchy. That is also why
I decided to use a hierarchy: I am at least not aware of a do-able alternative that would allow to use any available dimension without a hierarchy and calculate the median dynamically based off on that.
This is the MDX expression I use in order to calculate the median.
Median
NONEMPTY(EXISTING Descendants( [Statistics Hierachy1].[Hierarchy].CurrentMember,
[Statistics Hierachy1].[Hierarchy].[Transaction Id])),
[Measures].[Sale Price]
It works, and the numbers are correct, but it is way too slow in order to use it properly.
The hierarchy of dimension states that there is no relationship between the attributes of the hierarchy. That is right, because every single attribute is an attribute to the primary key (TransactionId).
So for me there are three ways to solve this:
1) Set up relationships. That, for some reason, brings up only a very limited subset of my data. Not sure why?
2) Get the hierarchy to work properly so it calculates the underlying median FASTER!
3) Set up a different measure (maybe my MDX is totally wrong?) to calculate the median the right way? In the end the median needs to be calculated based off on all underlying transactions that make up to the current level of the hierarchy.
In the end we are not talking about a ultra-large cube. Right now it only has like 3.1 Million rows in its one single partition.
Can anybody of you help me to address either the issue I am facing with the hierarchy (one I set up the relations I only see a subset of data) and/or let me know how to set up the median measure the right way ?
Thanks in advance! I really appreciate any help!
Thanks,
LarsHi L,
I would encourage you to set up the attribute hierarchies. That will make your calculation much faster, the further down the user is in the hierarchy. This is because the nonempty set you are getting the median from will be much smaller.
As you point out, to have an attribute hierarhcy, you need to have keys that cascade down, which you haven't got, at least yet. One simple way around this is to use composite keys all the way down the hierarchy. ie. State just has State as key,
County has State and County as key, Town has State, County and Town in key etc. I can assure you that this will make you calc much faster down the hierarchy.
One side effect you will have is that attributes will now be unique based on their parents. Two towns with the same name in different states or counties will appear as separate towns. You may or may not want this. If you don't want it,
simply have two Town attributes, call one TownKey (with composite key) which will be invisible as an attribute but used in the hierarchy. The other Town attribute simply has Town as the key, so it can be used as an attribute on its own. Town attribute
can be an attribute of TownKey.
Hope that makes sense,
Richard -
I'm creating a SSRS report using SSAS cube as a source.
When creating a dataset for the report, I'm having trouble with MDX to select a specific dimension member and its descendants from parent child dimension where dimension member names can be same in dimension hierarchy.
Lets say for example that I have an account dimension where,
In level 02 I have company ID:s 101, 102, 103 and so on...
In level 03 I have Balance sheet
In level 04 I have some account groups, Assets, Liabilities and so on... and In level 05 I have individual accounts
How can I select for example company 102:s Assets from level 04 and its descendants?
Normally in adventure works I would do this if I've wanted Current Assets and its descendants:
SELECT NON EMPTY { [Measures].[Amount] } ON COLUMNS, NON EMPTY
{ (DESCENDANTS([Account].[Accounts].[Account Level 03].[Current Assets]) ) } ON ROWS
FROM [Adventure Works]
But in my Account dimension at level 04 I have Assets member as many times as I have companies in level 02.
TuomoHi Tuomo Helminen,
To this requirement of yours, I would recommend you use Cascading Parameters in Reporting services, you can refer to this FAQ How do I create cascading parameters when using cube database in Reporting Services at this link
http://blogs.msdn.com/b/sqlforum/archive/2011/04/11/forum-faq-how-do-i-create-cascading-parameters-when-using-cube-database-in-reporting-services.aspx
Thanks,
Challen Fu
TechNet
Subscriber Supportinforum
If you have any feedback on our support, please [email protected]
Please remember to mark the replies as answers if they help and unmark them if they provide no help. -
MDX IsLeaf Function for the Hierarchy Member
Hi Guys
Could you share your knowledge about the behaviour of SSAS for this MDX query Please ?
A similar query about the below takes less than a sec to complete with a particular member. However with different member (Parent Member of a Hierarchy), it is running forever and I killed the query.
The profiler shows the event “Query Cube Begin” then nothing happens and I don’t see any event at all. Also I am the only user connected with the SSAS cube.
Could you share your thoughts to investigate this issue ?
Please let me know, if you need any more information.
Similar MDX Query:
With
Member [Measures].[IsLeafFlag]
as
IsLeaf([Customer].[Customer Geography].[Country].[Canada])
Select [Measures].[IsLeafFlag]
on Columns
from [Adventure Works]Hi SQLguy,
I have tested it on my local environment in AdventureWorks cube, and we cannot reproduce this issue. The query return the result in less than a second no matter which member in IsLeaf function.
IsLeaf (MDX)
Returns whether a specified member is a leaf member.
Argument
Member_Expression
A valid Multidimensional Expressions (MDX) expression that returns a member.
In your scenario, the query run forever when putting a parent member of a hierarchy into IsLeaf function, please ensure that this is a valid member.
Regards,
Charlie Liao
If you have any feedback on our support, please click
here
Charlie Liao
TechNet Community Support -
Display two members of same dimension hierarchy using mdx on 2 diff columns
Hi,
Is it possible to print the parent of a member that belongs to a certain level in the hierarchy. For this example, the Dimension hierarchy is a Variable hierarchy based on a Row Source, - BOM - Bill of Materials.
Let say there is a BOM hierarchy with 4 levels.
Finished Good - Comp1 - Comp2 - Comp3.
Then we want to display in the IOP report as follows.
Finished Good Supply Chain--These are the column headers
Finished Good1 Finished Good1
Comp1
Comp2
Finished Good2 Finished Good2
Comp3
Comp4
Comp3
Edited by: user596497 on Mar 16, 2011 1:39 PMThe question is wrong ...
MDX helps you to construct cross-product of indices for the underlying cube and then it tells the system to find whether there is any cell with that index, and if so, returns a value for that combination.
If you put two dimensions next to each other, what does it mean? There is no such combination in the underlying cube as each dimension is uniquely represented. We will throw an error as follows:
You cannot mix-up display semantics with the syntax/semantics of MDX.
"Can only cross join sets with different dimensions Statement"
An internal error occurred during the query execution phase. Please contact your administrator.
Query Definition
WITH SET [AnotherGeography] AS '{[Geography].DefaultMember}' SELECT {Fiscal.DefaultMember} ON COLUMNS, { CrossJoin( {[Geography].DefaultMember}, {[Customers].DefaultMember}, {[AnotherGeography]}, {Hierarchize(Descendants([Product].DefaultMember, [Product].[Product Family], SELF_AND_BEFORE), POST) }, { [Measures].[Target Revenue], [Measures].[Demand Plan Revenue], [Measures].[Market Share], [Measures].[Adjusted Demand Plan Quantity] }) } ON ROWS FROM [Demand]
Can only cross join sets with different dimensions Statement: WITH SET [AnotherGeography] AS '{[Geography].DefaultMember}' SELECT {Fiscal.DefaultMember} ON COLUMNS, { CrossJoin( {[Geography].DefaultMember}, {[Customers].DefaultMember}, {[AnotherGeography]}, {Hierarchize(Descendants([Product].DefaultMember, [Product].[Product Family], SELF_AND_BEFORE), POST) }, { [Measures].[Target Revenue], [Measures].[Demand Plan Revenue], [Measures].[Market Share], [Measures].[Adjusted Demand Plan Quantity] }) } ON ROWS FROM [Demand] -
MDX missing out 'All' level results for attribute joined to leaf level of a hierarchy
I have an MDX query with a cross-join of a hierarchy and a simple attribute on rows. The leaf level of the hierarchy maps one-to-one with the simple hierarchy, while the other levels map onto multiple values of the simple attribute. In the results,
an 'All' level row of the simple hierarchy is produced for all values of the hierarchy. However:
1. if the rows are numbered using Rank, the row number that the 'All' rows of the root level values of the hierarchy should have is skipped, and the rows that should have it have a repeat of the single child's row number.
2. in SSRS no 'All' level of the simple attribute is found for the root level of the hierarchy.
My reading of this is that the All level is not being produced for the one-to-one root level relationship, and the query is reading the first non-empty value.
Any thoughts on (1) how to force the production of the missing 'All' level values; and (2) how to use Scope or some other means to place values in the positions where they are missing.
KenIt would be helpful to see your MDX query and a screenshot illustrating the results!
Thanks! Josh -
Is it possible to build hierarchy (among 4-5 std. dim) in MDX query?
Hi,
Let's say i have 4 standard dimensions:
Std1
Std2
Std3
Std4
Each of the above standard dimensions have their own hierarchy.
Std1
==Std1_1
==Std1_1_1
Std2
==Std2_1
Std3
==Std_3_1
Std4
==Std4_1
Now, we can see that there is "NO" hierarchical relationship between any two of the above four standard dimensions.
I would like to build a hierarchy(dynamically) in the MDX query (during retrieval), so that, the standard dimensions and the measures are retrieved in my required hierarchy.
For example, if at runtime, i want hierarchy like the below:
Std2
|_ Std3
|_Std1
|_Std4
Can i build this hierarchy in MDX query?
Is there any way to do this in MDX?
Thanks in advance.
Regards,
Vivek GanesanWhat you want is a custom data formatter. I would give you some links, but my iPad wants to convert them into the documentation viewer.
You aren't going to find much help with C++ debugging. While Apple's Clang has made great improvements in C++ support compared to GCC, C++ is really not something that Mac or iOS programmers typically use. The Cocoa containers and objects are so much more versatile. You kind of have to have a masochist streak and a 7 year development schedule to use C++. C++ is experiencing a bit of a resurgence, especially in defense markets. For a long time, compilers had such poor support for C++ that it just wasn't possible. After simplifying the language a little, compilers can now compile and link C++. Consultants have realized they can provide C++ services and burn though billable hours better than any other language on the market. Independent developer, however, don't have those schedules and budgets so they tend to use NSArray. Xcode supports it better in the debugg and, chances are, you don't need to debug it anyway. There are a number of matrix classes built on Cocoa. -
I have a cube hierarchy that has full path
[Location].[Location Hierarchy].[Department].&[DEPT 07].&[East].&[Manager].&[site code]
I can return the full hierarchy using something like
[Location].[Location Hierarchy].[All]
However, I want to return everything ([All]) at a lower level of the hierarchy. For example,
[Location].[Location Hierarchy].[Department].&[DEPT 07].&[All]
To get everything in Dept 07.
Of course your first response would be - just use the same statement without ALL
[Location].[Location Hierarchy].[Department].&[DEPT 07]
but the problem is I want to use a lookup cell that allows the user to select All, East, or West
=Cubemember("MyCube","[Location].[Location Hierarchy].[Department].&[DEPT 07].&[" & B1 & "]")
And that works for East and West, but not All, because I can't just append [All] partway down a hierarchy to get everything underneath (at least as far as I can tell).
Can anyone throw me a hint on how to accomplish a dynamic cubemember formula that includes/allows an All option?
I even tried embedding the cubeformula in an IF statement (If B2="All", Cubemember(formula1), Cubemember(formula2)) but Excel didn't like that either.
Thanks for any help!!If you want to display the sum for a given hierarchy level, you should use CUBESET function.
e.g.
=IF(B2="all",CUBESET("mycube","[Location].[Location Hierarchy].[Department].&[DEPT 07]","all"),Cubemember("MyCube","[Location].[Location Hierarchy].[Department].&[DEPT 07].&["&B1&"]"))
Hope it helps.
Maybe you are looking for
-
STB not responding to FIOS TV Central
Hi all, Sorry if this is dupeage but I did a quick search and didn't find anything. I just installed a new DVR which replaced a SD STB. I've actived remote DVR pn the box and FIOS TV central sees it but says that it is not resonding. I am unable to a
-
Last two versions of Flash frequently crash
Adobe Flash last two newest version's now using 11.9.900.117 seems to have a problem with crashing in Firefox on my Vista Desktop frequently, but with my windows 8.1 PC it also happens but not as frequent. I always send crash reports but don't seem t
-
Fit- gap anlysis, as- is stusy, to- be process
hi, can any one explain fit- gap anlysis, as- is stusy, to- be process with a business scenario u can mail any info regarding this to [email protected] regards amulya
-
I don't receive attachments on Mail 6.5
Hi All, I set up my Mail account on Mail 6.5, I can receive and send mails... but have problems receiving attachements... The thing is that I can view the files on my iPhone but when I open the mail on the Mac, I can't see them, I have to forward me
-
Proverb; if you want a job done right do it yourself, because like me you may not get any help from creative. <FONT face="Comic Sans MS" size=3>Previously my problem was that after downloading an update my computer would not recognise my Zen touch co