![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Try this SELECT {Some Measure} ON COLUMNS, Filter({ Descendants ([Fund].[All Fund], [Fund].[All Fund].Level, AFTER)}, ([Fund].CurrentMember.Properties("SubAsset Class") = "25")) ON ROWS FROM FundCube You can define this in a calculated member if you want Hope this help Milind |
#4
| |||
| |||
|
|
do you mean that you don't know the "25" value? "it dependes on CurrentMember property." the currentmember of which dimension? do you want something like: SELECT {Some Measure} ON COLUMNS, Filter({ Descendants ([Fund].[All Fund], [Fund].[All Fund].Level,AFTER)}, ([Fund].CurrentMember.Properties("SubAsset Class") = <filtering dimension>.currentmember.property("SubAsset Class Target"))) ON ROWS FROM FundCube and the <filtering dimension> contains the list of possibile values to be used has the target of the filter. "martinbx" <martinbx (AT) discussions (DOT) microsoft.com> wrote in message news:7C971CFF-99D0-402C-991F-8A052AD99B5B (AT) microsoft (DOT) com... Thank you Milind, but my problem is that I do not know value of :SubAsset Class" in advance, it dependes on CurrentMember property. "Milind" wrote: Try this SELECT {Some Measure} ON COLUMNS, Filter({ Descendants ([Fund].[All Fund], [Fund].[All Fund].Level, AFTER)}, ([Fund].CurrentMember.Properties("SubAsset Class") = "25")) ON ROWS FROM FundCube You can define this in a calculated member if you want Hope this help Milind |
#5
| |||
| |||
|
|
Hi, I am trying to do something like this set [CurrentFund] as '{[Fund].currentMember}' member [Measures].[CurrentFund ID] as ' CLng([CurrentFund].Item(0).Item(0).Properties("SubAsset Class"))' member [Measures].[FundSiblings] ' CStr ( Filter ( Descendants ([Fund].[All Fund], [Fund].[All Fund].Level,AFTER), CLng([Fund].CurrentMember.Properties("SubAsset Class")= [Measures].[CurrentFund ID] ).Count ) but I made an error somewhere, sinceMDX can not find properties in my set, but does not have any problem when it dealing with 'CurrentMember' not packed in the set. So I am looking for way to get sutset of [Fund] which has only 'funds' with exactly the same 'subasset class' as 'CurrentMember' "Jéjé" wrote: do you mean that you don't know the "25" value? "it dependes on CurrentMember property." the currentmember of which dimension? do you want something like: SELECT {Some Measure} ON COLUMNS, Filter({ Descendants ([Fund].[All Fund], [Fund].[All Fund].Level,AFTER)}, ([Fund].CurrentMember.Properties("SubAsset Class") = <filtering dimension>.currentmember.property("SubAsset Class Target"))) ON ROWS FROM FundCube and the <filtering dimension> contains the list of possibile values to be used has the target of the filter. "martinbx" <martinbx (AT) discussions (DOT) microsoft.com> wrote in message news:7C971CFF-99D0-402C-991F-8A052AD99B5B (AT) microsoft (DOT) com... Thank you Milind, but my problem is that I do not know value of :SubAsset Class" in advance, it dependes on CurrentMember property. "Milind" wrote: Try this SELECT {Some Measure} ON COLUMNS, Filter({ Descendants ([Fund].[All Fund], [Fund].[All Fund].Level, AFTER)}, ([Fund].CurrentMember.Properties("SubAsset Class") = "25")) ON ROWS FROM FundCube You can define this in a calculated member if you want Hope this help Milind |
#6
| |||
| |||
|
|
Using the Foodmart dimension Store instead of Funds, and the property "Store Manager" instead of "SubAsset Class"), is this what you mean? (see Johnson in query results): with member measures.Manager as '[store].currentmember.properties("Store Manager")' member measures.TotalManager as 'sum( generate ( {[store].currentmember} as curstor , filter( [store name].members , curstor.current.properties("Store Manager") = [Store].currentmember.properties("Store Manager"))) ,[unit sales] )' select {Manager, [unit sales] ,[TotalManager] } on columns, [Store Name].members on rows from sales HTH, -- Brian Altmann BI Specialist Huddle Group S.A (www.huddle.com.ar) www.geocities.com/brianaltmann/olap.html "martinbx" wrote: Hi, I am trying to do something like this set [CurrentFund] as '{[Fund].currentMember}' member [Measures].[CurrentFund ID] as ' CLng([CurrentFund].Item(0).Item(0).Properties("SubAsset Class"))' member [Measures].[FundSiblings] ' CStr ( Filter ( Descendants ([Fund].[All Fund], [Fund].[All Fund].Level,AFTER), CLng([Fund].CurrentMember.Properties("SubAsset Class")= [Measures].[CurrentFund ID] ).Count ) but I made an error somewhere, sinceMDX can not find properties in my set, but does not have any problem when it dealing with 'CurrentMember' not packed in the set. So I am looking for way to get sutset of [Fund] which has only 'funds' with exactly the same 'subasset class' as 'CurrentMember' "Jéjé" wrote: do you mean that you don't know the "25" value? "it dependes on CurrentMember property." the currentmember of which dimension? do you want something like: SELECT {Some Measure} ON COLUMNS, Filter({ Descendants ([Fund].[All Fund], [Fund].[All Fund].Level,AFTER)}, ([Fund].CurrentMember.Properties("SubAsset Class") = <filtering dimension>.currentmember.property("SubAsset Class Target"))) ON ROWS FROM FundCube and the <filtering dimension> contains the list of possibile values to be used has the target of the filter. "martinbx" <martinbx (AT) discussions (DOT) microsoft.com> wrote in message news:7C971CFF-99D0-402C-991F-8A052AD99B5B (AT) microsoft (DOT) com... Thank you Milind, but my problem is that I do not know value of :SubAsset Class" in advance, it dependes on CurrentMember property. "Milind" wrote: Try this SELECT {Some Measure} ON COLUMNS, Filter({ Descendants ([Fund].[All Fund], [Fund].[All Fund].Level, AFTER)}, ([Fund].CurrentMember.Properties("SubAsset Class") = "25")) ON ROWS FROM FundCube You can define this in a calculated member if you want Hope this help Milind |
#7
| |||
| |||
|
|
'Count ( Generate( {[Portfolio Hierarchies].CurrentMember} as CurrMember, Filter( *** Portfolio Hierarchies Leaf Level Name***.Members, [Portfolio Hierarchies].CurrentMember.Properties("Portfolio Id")= CurrMember.Current.Properties("Portfolio Id") ) ) )' |
|
Thanks for advice Brian. Unfortunatly somebody rase "foodmart2000" database from our server, so I have to try on our code. So I wrote: 'Count ( Generate( {[Portfolio Hierarchies].CurrentMember} as CurrMember, Filter( [Portfolio Hierarchies].Members, [Portfolio Hierarchies].CurrentMember.Properties("Portfolio Id")= CurrMember.Current.Properties("Portfolio Id") ) ) )' I got back an error: "Formula error - property name is not valid: "Portfolio Id" - an error occuerred during attempt to get a cell value", but if I try directly to output [Portfolio Hierarchies].CurrentMember.Properties("Portfolio Id") , I get back valid answer. I would appreciate any suggestion on what is going on and how to fix it. "Brian Altmann" wrote: Using the Foodmart dimension Store instead of Funds, and the property "Store Manager" instead of "SubAsset Class"), is this what you mean? (see Johnson in query results): with member measures.Manager as '[store].currentmember.properties("Store Manager")' member measures.TotalManager as 'sum( generate ( {[store].currentmember} as curstor , filter( [store name].members , curstor.current.properties("Store Manager") = [Store].currentmember.properties("Store Manager"))) ,[unit sales] )' select {Manager, [unit sales] ,[TotalManager] } on columns, [Store Name].members on rows from sales HTH, -- Brian Altmann BI Specialist Huddle Group S.A (www.huddle.com.ar) www.geocities.com/brianaltmann/olap.html "martinbx" wrote: Hi, I am trying to do something like this set [CurrentFund] as '{[Fund].currentMember}' member [Measures].[CurrentFund ID] as ' CLng([CurrentFund].Item(0).Item(0).Properties("SubAsset Class"))' member [Measures].[FundSiblings] ' CStr ( Filter ( Descendants ([Fund].[All Fund], [Fund].[All Fund].Level,AFTER), CLng([Fund].CurrentMember.Properties("SubAsset Class")= [Measures].[CurrentFund ID] ).Count ) but I made an error somewhere, sinceMDX can not find properties in my set, but does not have any problem when it dealing with 'CurrentMember' not packed in the set. So I am looking for way to get sutset of [Fund] which has only 'funds' with exactly the same 'subasset class' as 'CurrentMember' "Jéjé" wrote: do you mean that you don't know the "25" value? "it dependes on CurrentMember property." the currentmember of which dimension? do you want something like: SELECT {Some Measure} ON COLUMNS, Filter({ Descendants ([Fund].[All Fund], [Fund].[All Fund].Level,AFTER)}, ([Fund].CurrentMember.Properties("SubAsset Class") = <filtering dimension>.currentmember.property("SubAsset Class Target"))) ON ROWS FROM FundCube and the <filtering dimension> contains the list of possibile values to be used has the target of the filter. "martinbx" <martinbx (AT) discussions (DOT) microsoft.com> wrote in message news:7C971CFF-99D0-402C-991F-8A052AD99B5B (AT) microsoft (DOT) com... Thank you Milind, but my problem is that I do not know value of :SubAsset Class" in advance, it dependes on CurrentMember property. "Milind" wrote: Try this SELECT {Some Measure} ON COLUMNS, Filter({ Descendants ([Fund].[All Fund], [Fund].[All Fund].Level, AFTER)}, ([Fund].CurrentMember.Properties("SubAsset Class") = "25")) ON ROWS FROM FundCube You can define this in a calculated member if you want Hope this help Milind |
#8
| |||
| |||
|
|
If your dimension name is [Portfolio Hierarchies] then you should replace it by the Leaf level name as shown here: 'Count ( Generate( {[Portfolio Hierarchies].CurrentMember} as CurrMember, Filter( *** Portfolio Hierarchies Leaf Level Name***.Members, [Portfolio Hierarchies].CurrentMember.Properties("Portfolio Id")= CurrMember.Current.Properties("Portfolio Id") ) ) )' A member property is only valid for the level at which it is defined, so you have use [Dimension Level].members. If you [Dimension].members you get the error you have reported. HTH, -- Brian Altmann BI Specialist Huddle Group S.A (www.huddle.com.ar) www.geocities.com/brianaltmann/olap.html "martinbx" wrote: Thanks for advice Brian. Unfortunatly somebody rase "foodmart2000" database from our server, so I have to try on our code. So I wrote: 'Count ( Generate( {[Portfolio Hierarchies].CurrentMember} as CurrMember, Filter( [Portfolio Hierarchies].Members, [Portfolio Hierarchies].CurrentMember.Properties("Portfolio Id")= CurrMember.Current.Properties("Portfolio Id") ) ) )' I got back an error: "Formula error - property name is not valid: "Portfolio Id" - an error occuerred during attempt to get a cell value", but if I try directly to output [Portfolio Hierarchies].CurrentMember.Properties("Portfolio Id") , I get back valid answer. I would appreciate any suggestion on what is going on and how to fix it. "Brian Altmann" wrote: Using the Foodmart dimension Store instead of Funds, and the property "Store Manager" instead of "SubAsset Class"), is this what you mean? (see Johnson in query results): with member measures.Manager as '[store].currentmember.properties("Store Manager")' member measures.TotalManager as 'sum( generate ( {[store].currentmember} as curstor , filter( [store name].members , curstor.current.properties("Store Manager") = [Store].currentmember.properties("Store Manager"))) ,[unit sales] )' select {Manager, [unit sales] ,[TotalManager] } on columns, [Store Name].members on rows from sales HTH, -- Brian Altmann BI Specialist Huddle Group S.A (www.huddle.com.ar) www.geocities.com/brianaltmann/olap.html "martinbx" wrote: Hi, I am trying to do something like this set [CurrentFund] as '{[Fund].currentMember}' member [Measures].[CurrentFund ID] as ' CLng([CurrentFund].Item(0).Item(0).Properties("SubAsset Class"))' member [Measures].[FundSiblings] ' CStr ( Filter ( Descendants ([Fund].[All Fund], [Fund].[All Fund].Level,AFTER), CLng([Fund].CurrentMember.Properties("SubAsset Class")= [Measures].[CurrentFund ID] ).Count ) but I made an error somewhere, sinceMDX can not find properties in my set, but does not have any problem when it dealing with 'CurrentMember' not packed in the set. So I am looking for way to get sutset of [Fund] which has only 'funds' with exactly the same 'subasset class' as 'CurrentMember' "Jéjé" wrote: do you mean that you don't know the "25" value? "it dependes on CurrentMember property." the currentmember of which dimension? do you want something like: SELECT {Some Measure} ON COLUMNS, Filter({ Descendants ([Fund].[All Fund], [Fund].[All Fund].Level,AFTER)}, ([Fund].CurrentMember.Properties("SubAsset Class") = <filtering dimension>.currentmember.property("SubAsset Class Target"))) ON ROWS FROM FundCube and the <filtering dimension> contains the list of possibile values to be used has the target of the filter. "martinbx" <martinbx (AT) discussions (DOT) microsoft.com> wrote in message news:7C971CFF-99D0-402C-991F-8A052AD99B5B (AT) microsoft (DOT) com... Thank you Milind, but my problem is that I do not know value of :SubAsset Class" in advance, it dependes on CurrentMember property. "Milind" wrote: Try this SELECT {Some Measure} ON COLUMNS, Filter({ Descendants ([Fund].[All Fund], [Fund].[All Fund].Level, AFTER)}, ([Fund].CurrentMember.Properties("SubAsset Class") = "25")) ON ROWS FROM FundCube You can define this in a calculated member if you want Hope this help Milind |
#9
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |