![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
This Q regards AS 2000 I have one dimension called "Property" that has a (level) property called 'SameStoreNextYear_Flag'. I want to add a calculated member called "SameStoreProjected" to another dim, "PortfolioStatus" that is a list of all the Property members that have SameStoreNextYear_Flag='Y'. The idea is that when "SameStoreProjected" is a slicer and Property.Members is on the rows, the rows will be filtered to only those where SameStoreNextYear_Flag='Y'. How do I do it ? This is a start, that is not working: Iif([Property].CurrentMember.Properties ("Samestorenextyr_Flag") = "Y", [Property].CurrentMember,0) |
#4
| |||
| |||
|
|
First off the reason why your iif statement is not working is that in AS 2000, an iif can only return a string or a number and you are trying to return an member (the iif in AS 2005 can return members) Secondly I don't know if the calculated member in the slicer is going to work, but what you could do is to either create a virtual dimension off the member property - you could then use the virtual dim in the slicer. Or you could use the filter function, either directly in your query or to create a named set. eg. FILTER(Property.Stores.Members ,Property.CurrentMember.Properties("Samestorenexty r_Flag") = "Y") -- Regards Darren Gosbell [MCSD] Blog: http://www.geekswithblogs.net/darrengosbell In article <99ADA4D1-03BE-4C05-AB80-EFC508A80C45 (AT) microsoft (DOT) com>, markgsch (AT) noemail (DOT) noemail says... This Q regards AS 2000 I have one dimension called "Property" that has a (level) property called 'SameStoreNextYear_Flag'. I want to add a calculated member called "SameStoreProjected" to another dim, "PortfolioStatus" that is a list of all the Property members that have SameStoreNextYear_Flag='Y'. The idea is that when "SameStoreProjected" is a slicer and Property.Members is on the rows, the rows will be filtered to only those where SameStoreNextYear_Flag='Y'. How do I do it ? This is a start, that is not working: Iif([Property].CurrentMember.Properties ("Samestorenextyr_Flag") = "Y", [Property].CurrentMember,0) |
#5
| |||
| |||
|
|
Darren, I can get this to work with a virtual dim, but would like to avoid it if possible. With your help I was able to create a named set that works as follows: FILTER([Property].[Project].Members ,[Property].CurrentMember.Properties("Samestorenextyr_Flag") = "Y") Now how do I now create a calculated member in the PortfolioStatus dim that brings in the aggregation of the named sets' members ? Thanks "Darren Gosbell" wrote: First off the reason why your iif statement is not working is that in AS 2000, an iif can only return a string or a number and you are trying to return an member (the iif in AS 2005 can return members) Secondly I don't know if the calculated member in the slicer is going to work, but what you could do is to either create a virtual dimension off the member property - you could then use the virtual dim in the slicer. Or you could use the filter function, either directly in your query or to create a named set. eg. FILTER(Property.Stores.Members ,Property.CurrentMember.Properties("Samestorenexty r_Flag") = "Y") -- Regards Darren Gosbell [MCSD] Blog: http://www.geekswithblogs.net/darrengosbell In article <99ADA4D1-03BE-4C05-AB80-EFC508A80C45 (AT) microsoft (DOT) com>, markgsch (AT) noemail (DOT) noemail says... This Q regards AS 2000 I have one dimension called "Property" that has a (level) property called 'SameStoreNextYear_Flag'. I want to add a calculated member called "SameStoreProjected" to another dim, "PortfolioStatus" that is a list of all the Property members that have SameStoreNextYear_Flag='Y'. The idea is that when "SameStoreProjected" is a slicer and Property.Members is on the rows, the rows will be filtered to only those where SameStoreNextYear_Flag='Y'. How do I do it ? This is a start, that is not working: Iif([Property].CurrentMember.Properties ("Samestorenextyr_Flag") = "Y", [Property].CurrentMember,0) |
#6
| |||
| |||
|
|
Actually I'm can't remember why I was thinking that the calculated member would not work. To calculate a single member, it should be as simple as wrapping the set in a call to the aggregate (or sum) function. eg. AGGREGATE(FILTER([Property].[Project].Members ,[Property].CurrentMember.Properties("Samestorenextyr_Flag") = "Y")) -- Regards Darren Gosbell [MCSD] Blog: http://www.geekswithblogs.net/darrengosbell In article <FD39C45C-4F99-441C-BB62-C523062BE58B (AT) microsoft (DOT) com>, markgsch (AT) noemail (DOT) noemail says... Darren, I can get this to work with a virtual dim, but would like to avoid it if possible. With your help I was able to create a named set that works as follows: FILTER([Property].[Project].Members ,[Property].CurrentMember.Properties("Samestorenextyr_Flag") = "Y") Now how do I now create a calculated member in the PortfolioStatus dim that brings in the aggregation of the named sets' members ? Thanks "Darren Gosbell" wrote: First off the reason why your iif statement is not working is that in AS 2000, an iif can only return a string or a number and you are trying to return an member (the iif in AS 2005 can return members) Secondly I don't know if the calculated member in the slicer is going to work, but what you could do is to either create a virtual dimension off the member property - you could then use the virtual dim in the slicer. Or you could use the filter function, either directly in your query or to create a named set. eg. FILTER(Property.Stores.Members ,Property.CurrentMember.Properties("Samestorenexty r_Flag") = "Y") -- Regards Darren Gosbell [MCSD] Blog: http://www.geekswithblogs.net/darrengosbell In article <99ADA4D1-03BE-4C05-AB80-EFC508A80C45 (AT) microsoft (DOT) com>, markgsch (AT) noemail (DOT) noemail says... This Q regards AS 2000 I have one dimension called "Property" that has a (level) property called 'SameStoreNextYear_Flag'. I want to add a calculated member called "SameStoreProjected" to another dim, "PortfolioStatus" that is a list of all the Property members that have SameStoreNextYear_Flag='Y'. The idea is that when "SameStoreProjected" is a slicer and Property.Members is on the rows, the rows will be filtered to only those where SameStoreNextYear_Flag='Y'. How do I do it ? This is a start, that is not working: Iif([Property].CurrentMember.Properties ("Samestorenextyr_Flag") = "Y", [Property].CurrentMember,0) |
#7
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |