![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Something like: 1. SUM(Time.Children - {Time.FirstChild.NextMember}) 2. SUM(Time.Children) - iif(Rank(Time.CurrentMember, Time.Siblings) = 2, Time.LastChild, 0) 3. SUM(Time.Children - {Time.FirstChild}) - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
#4
| |||
| |||
|
|
Thanks for your reply. I try to modify your MDX to another dimension but seems it affects other dimension. Eg, I have Packaging_Product_Shop with level packaging, product, shop Shop_Packaging_Product with level shop, packaging, product dimension. When I put in SUM([Product_Packaging_Shop].CurrentMember.children-Shop.FirstChild) it works for Product_Packaging_Shop but other dimension screwed up with #Value!. What has happen? "Deepak Puri" wrote: Something like: 1. SUM(Time.Children - {Time.FirstChild.NextMember}) 2. SUM(Time.Children) - iif(Rank(Time.CurrentMember, Time.Siblings) = 2, Time.LastChild, 0) 3. SUM(Time.Children - {Time.FirstChild}) - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
#5
| |||
| |||
|
|
If I understand you correctly and you are using the same level name (Shop) for more than one dimension, then you should always use the fully qualified level name syntax : [dimension name].[level name]. Of course I'm not sure this is what's causing your problem but not using the full name certainly could produce unexpected results. HTH, -- Brian Altmann BI Specialist Huddle Group S.A (www.huddle.com.ar) www.geocities.com/brianaltmann/olap.html "Joel Leong" wrote: Thanks for your reply. I try to modify your MDX to another dimension but seems it affects other dimension. Eg, I have Packaging_Product_Shop with level packaging, product, shop Shop_Packaging_Product with level shop, packaging, product dimension. When I put in SUM([Product_Packaging_Shop].CurrentMember.children-Shop.FirstChild) it works for Product_Packaging_Shop but other dimension screwed up with #Value!. What has happen? "Deepak Puri" wrote: Something like: 1. SUM(Time.Children - {Time.FirstChild.NextMember}) 2. SUM(Time.Children) - iif(Rank(Time.CurrentMember, Time.Siblings) = 2, Time.LastChild, 0) 3. SUM(Time.Children - {Time.FirstChild}) - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
![]() |
| Thread Tools | |
| Display Modes | |
| |