![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
-----Original Message----- I have a Dimension called StatementCode which has 5 Levels. I would like to calculate a running total for the members of the second level (s2code). So instead of showing this (i hope the formatting is preserved): 5 - 14,665,974.97 10 - (5,554,260.80) 15 - 1,372,785.75 20 - (8,159,472.30) 30 - 21,330.24 35 - (1,078,496.38) 40 - (434,210.00) I would like to show this: 5 - 14,665,974.97 10 - 9,111,714.17 15 - 10,484,499.92 20 - 2,325,027.62 30 - 2,346,357.86 35 - 1,267,861.48 40 - 833,651.48 Please let me know if you need more information, any help is greatly appreciated. Also, I am running the Standard version of SQL 2000. Trevor . |
#3
| |||
| |||
|
|
USDBal Running Total 5 - 14,665,974.97 14,665,974.97 10 - (5,554,260.80) 9,111,714.17 15 - 1,372,785.75 10,484,499.92 20 - (8,159,472.30) 2,325,027.62 30 - 21,330.24 2,346,357.86 35 - (1,078,496.38) 1,267,861.48 40 - (434,210.00) 833,651.48 -----Original Message----- Trevor, Can you try creating a calculated measures that is like so: ([StatementCode].Parent, [Measures].[Total]) + ([Measures]. [Total]) You may want to hide your original Measures.Total so it no longer shows up. At the top most level it will display simply the measures.total since there is no parent. All other levels will work as you need. -mike -----Original Message----- I have a Dimension called StatementCode which has 5 Levels. I would like to calculate a running total for the members of the second level (s2code). So instead of showing this (i hope the formatting is preserved): 5 - 14,665,974.97 10 - (5,554,260.80) 15 - 1,372,785.75 20 - (8,159,472.30) 30 - 21,330.24 35 - (1,078,496.38) 40 - (434,210.00) I would like to show this: 5 - 14,665,974.97 10 - 9,111,714.17 15 - 10,484,499.92 20 - 2,325,027.62 30 - 2,346,357.86 35 - 1,267,861.48 40 - 833,651.48 Please let me know if you need more information, any help is greatly appreciated. Also, I am running the Standard version of SQL 2000. Trevor . . |
#4
| |||
| |||
|
|
-----Original Message----- Trevor, Can you try creating a calculated measures that is like so: ([StatementCode].Parent, [Measures].[Total]) + ([Measures]. [Total]) You may want to hide your original Measures.Total so it no longer shows up. At the top most level it will display simply the measures.total since there is no parent. All other levels will work as you need. -mike -----Original Message----- I have a Dimension called StatementCode which has 5 Levels. I would like to calculate a running total for the members of the second level (s2code). So instead of showing this (i hope the formatting is preserved): 5 - 14,665,974.97 10 - (5,554,260.80) 15 - 1,372,785.75 20 - (8,159,472.30) 30 - 21,330.24 35 - (1,078,496.38) 40 - (434,210.00) I would like to show this: 5 - 14,665,974.97 10 - 9,111,714.17 15 - 10,484,499.92 20 - 2,325,027.62 30 - 2,346,357.86 35 - 1,267,861.48 40 - 833,651.48 Please let me know if you need more information, any help is greatly appreciated. Also, I am running the Standard version of SQL 2000. Trevor . . |
#5
| |||
| |||
|
|
-----Original Message----- I tried your suggestion but it does not produce the required results. This would be acceptable. USDBal Running Total 5 - 14,665,974.97 14,665,974.97 10 - (5,554,260.80) 9,111,714.17 15 - 1,372,785.75 10,484,499.92 20 - (8,159,472.30) 2,325,027.62 30 - 21,330.24 2,346,357.86 35 - (1,078,496.38) 1,267,861.48 40 - (434,210.00) 833,651.48 -----Original Message----- Trevor, Can you try creating a calculated measures that is like so: ([StatementCode].Parent, [Measures].[Total]) + ([Measures]. [Total]) You may want to hide your original Measures.Total so it no longer shows up. At the top most level it will display simply the measures.total since there is no parent. All other levels will work as you need. -mike -----Original Message----- I have a Dimension called StatementCode which has 5 Levels. I would like to calculate a running total for the members of the second level (s2code). So instead of showing this (i hope the formatting is preserved): 5 - 14,665,974.97 10 - (5,554,260.80) 15 - 1,372,785.75 20 - (8,159,472.30) 30 - 21,330.24 35 - (1,078,496.38) 40 - (434,210.00) I would like to show this: 5 - 14,665,974.97 10 - 9,111,714.17 15 - 10,484,499.92 20 - 2,325,027.62 30 - 2,346,357.86 35 - 1,267,861.48 40 - 833,651.48 Please let me know if you need more information, any help is greatly appreciated. Also, I am running the Standard version of SQL 2000. Trevor . . . |
#6
| |||
| |||
|
|
USDBal Running Total 5 - 14,665,974.97 29,332,568.46 10 - (5,554,260.80) -11,108,521.88 15 - 1,372,785.75 2,745,571.46 20 - (8,159,472.30) -16,318,942.50 30 - 21,330.24 42,660.48 35 - (1,078,496.38) -2,156,992.76 40 - (434,210.00) -833,651.48 |
|
USDBal Running Total 5 - 14,665,974.97 14,665,974.97 10 - (5,554,260.80) 9,111,714.17 15 - 1,372,785.75 10,484,499.92 20 - (8,159,472.30) 2,325,027.62 30 - 21,330.24 2,346,357.86 35 - (1,078,496.38) 1,267,861.48 40 - (434,210.00) 833,651.48 -----Original Message----- So, only on the second level you want to keep a running total and other levels to be normal. This should take care of that if I understand your goal correctly. IIF([Account].CurrentMember.Level.Name = "Level 02" , ([StatementCode].Parent, [Measures].[Total]) + ([Measures]. [Total]), [Measures].[Total]) -mike -----Original Message----- I tried your suggestion but it does not produce the required results. This would be acceptable. USDBal Running Total 5 - 14,665,974.97 14,665,974.97 10 - (5,554,260.80) 9,111,714.17 15 - 1,372,785.75 10,484,499.92 20 - (8,159,472.30) 2,325,027.62 30 - 21,330.24 2,346,357.86 35 - (1,078,496.38) 1,267,861.48 40 - (434,210.00) 833,651.48 -----Original Message----- Trevor, Can you try creating a calculated measures that is like so: ([StatementCode].Parent, [Measures].[Total]) + ([Measures]. [Total]) You may want to hide your original Measures.Total so it no longer shows up. At the top most level it will display simply the measures.total since there is no parent. All other levels will work as you need. -mike -----Original Message----- I have a Dimension called StatementCode which has 5 Levels. I would like to calculate a running total for the members of the second level (s2code). So instead of showing this (i hope the formatting is preserved): 5 - 14,665,974.97 10 - (5,554,260.80) 15 - 1,372,785.75 20 - (8,159,472.30) 30 - 21,330.24 35 - (1,078,496.38) 40 - (434,210.00) I would like to show this: 5 - 14,665,974.97 10 - 9,111,714.17 15 - 10,484,499.92 20 - 2,325,027.62 30 - 2,346,357.86 35 - 1,267,861.48 40 - 833,651.48 Please let me know if you need more information, any help is greatly appreciated. Also, I am running the Standard version of SQL 2000. Trevor . . . . |
#7
| |||
| |||
|
|
-----Original Message----- I have a Dimension called StatementCode which has 5 Levels. I would like to calculate a running total for the members of the second level (s2code). So instead of showing this (i hope the formatting is preserved): 5 - 14,665,974.97 10 - (5,554,260.80) 15 - 1,372,785.75 20 - (8,159,472.30) 30 - 21,330.24 35 - (1,078,496.38) 40 - (434,210.00) I would like to show this: 5 - 14,665,974.97 10 - 9,111,714.17 15 - 10,484,499.92 20 - 2,325,027.62 30 - 2,346,357.86 35 - 1,267,861.48 40 - 833,651.48 Please let me know if you need more information, any help is greatly appreciated. Also, I am running the Standard version of SQL 2000. Trevor . |
#8
| |||
| |||
|
|
USDBal Running Total 5 - 14,665,974.97 * 2 = 29,332,568.46 10 - (5,554,260.80) * 2 = -11,108,521.88 15 - 1,372,785.75 etc.. 2,745,571.46 20 - (8,159,472.30) -16,318,942.50 30 - 21,330.24 42,660.48 35 - (1,078,496.38) -2,156,992.76 40 - (434,210.00) -833,651.48 -----Original Message----- So, only on the second level you want to keep a running total and other levels to be normal. This should take care of that if I understand your goal correctly. IIF([Account].CurrentMember.Level.Name = "Level 02" , ([StatementCode].Parent, [Measures].[Total]) + ([Measures]. [Total]), [Measures].[Total]) -mike -----Original Message----- I tried your suggestion but it does not produce the required results. This would be acceptable. USDBal Running Total 5 - 14,665,974.97 14,665,974.97 10 - (5,554,260.80) 9,111,714.17 15 - 1,372,785.75 10,484,499.92 20 - (8,159,472.30) 2,325,027.62 30 - 21,330.24 2,346,357.86 35 - (1,078,496.38) 1,267,861.48 40 - (434,210.00) 833,651.48 -----Original Message----- Trevor, Can you try creating a calculated measures that is like so: ([StatementCode].Parent, [Measures].[Total]) + ([Measures]. [Total]) You may want to hide your original Measures.Total so it no longer shows up. At the top most level it will display simply the measures.total since there is no parent. All other levels will work as you need. -mike -----Original Message----- I have a Dimension called StatementCode which has 5 Levels. I would like to calculate a running total for the members of the second level (s2code). So instead of showing this (i hope the formatting is preserved): 5 - 14,665,974.97 10 - (5,554,260.80) 15 - 1,372,785.75 20 - (8,159,472.30) 30 - 21,330.24 35 - (1,078,496.38) 40 - (434,210.00) I would like to show this: 5 - 14,665,974.97 10 - 9,111,714.17 15 - 10,484,499.92 20 - 2,325,027.62 30 - 2,346,357.86 35 - 1,267,861.48 40 - 833,651.48 Please let me know if you need more information, any help is greatly appreciated. Also, I am running the Standard version of SQL 2000. Trevor . . . . |
#9
| |||
| |||
|
|
-----Original Message----- Mike, we are getting very close, but it seems the first value in the running total should equal the first value in the level, but it does not. It seems to be adding some other values from the parent into the running total. I made a change and used currentMember but still get messed up values. IIF( [StatementCode].CurrentMember.Level.Name = "S2s2desc", ([StatementCode].CurrentMember, [Measures]. [USDBal]) + ([Measures]. [USDBal]), Null ) USDBal Running Total 5 - 14,665,974.97 29,332,568.46 10 - (5,554,260.80) -11,108,521.88 15 - 1,372,785.75 2,745,571.46 20 - (8,159,472.30) -16,318,942.50 30 - 21,330.24 42,660.48 35 - (1,078,496.38) -2,156,992.76 40 - (434,210.00) -833,651.48 Should be: USDBal Running Total 5 - 14,665,974.97 14,665,974.97 10 - (5,554,260.80) 9,111,714.17 15 - 1,372,785.75 10,484,499.92 20 - (8,159,472.30) 2,325,027.62 30 - 21,330.24 2,346,357.86 35 - (1,078,496.38) 1,267,861.48 40 - (434,210.00) 833,651.48 -----Original Message----- So, only on the second level you want to keep a running total and other levels to be normal. This should take care of that if I understand your goal correctly. IIF([Account].CurrentMember.Level.Name = "Level 02" , ([StatementCode].Parent, [Measures].[Total]) + ([Measures]. [Total]), [Measures].[Total]) -mike -----Original Message----- I tried your suggestion but it does not produce the required results. This would be acceptable. USDBal Running Total 5 - 14,665,974.97 14,665,974.97 10 - (5,554,260.80) 9,111,714.17 15 - 1,372,785.75 10,484,499.92 20 - (8,159,472.30) 2,325,027.62 30 - 21,330.24 2,346,357.86 35 - (1,078,496.38) 1,267,861.48 40 - (434,210.00) 833,651.48 -----Original Message----- Trevor, Can you try creating a calculated measures that is like so: ([StatementCode].Parent, [Measures].[Total]) + ([Measures]. [Total]) You may want to hide your original Measures.Total so it no longer shows up. At the top most level it will display simply the measures.total since there is no parent. All other levels will work as you need. -mike -----Original Message----- I have a Dimension called StatementCode which has 5 Levels. I would like to calculate a running total for the members of the second level (s2code). So instead of showing this (i hope the formatting is preserved): 5 - 14,665,974.97 10 - (5,554,260.80) 15 - 1,372,785.75 20 - (8,159,472.30) 30 - 21,330.24 35 - (1,078,496.38) 40 - (434,210.00) I would like to show this: 5 - 14,665,974.97 10 - 9,111,714.17 15 - 10,484,499.92 20 - 2,325,027.62 30 - 2,346,357.86 35 - 1,267,861.48 40 - 833,651.48 Please let me know if you need more information, any help is greatly appreciated. Also, I am running the Standard version of SQL 2000. Trevor . . . . . |
#10
| |||
| |||
|
|
-----Original Message----- Maybe it would help if we talk psuedo code for a minute. The MDX you wrote says this: IIF(WereAtLevel2, ThenDisplayMyUSDBalAddedToMyUSDBal, OtherWiseDisplayNull) You could even simplify the MDX you wrote to this: IIF([StatementCode].CurrentMember.Level.Name = "S2s2desc", [Measures].[USDBal] + [Measures].[USDBal], Null) CurrentMember is just assumed by AS therefore you really don't need to call it out. This is what I thought you are trying to do: Iff(WereAtLevel2, ThenDisplayMyUSDBalAddedToMyParentsUSDBal, OtherWiseDisplayMyUSDBal) Let me know... -mike -----Original Message----- Mike, we are getting very close, but it seems the first value in the running total should equal the first value in the level, but it does not. It seems to be adding some other values from the parent into the running total. I made a change and used currentMember but still get messed up values. IIF( [StatementCode].CurrentMember.Level.Name = "S2s2desc", ([StatementCode].CurrentMember, [Measures]. [USDBal]) + ([Measures]. [USDBal]), Null ) USDBal Running Total 5 - 14,665,974.97 29,332,568.46 10 - (5,554,260.80) -11,108,521.88 15 - 1,372,785.75 2,745,571.46 20 - (8,159,472.30) -16,318,942.50 30 - 21,330.24 42,660.48 35 - (1,078,496.38) -2,156,992.76 40 - (434,210.00) -833,651.48 Should be: USDBal Running Total 5 - 14,665,974.97 14,665,974.97 10 - (5,554,260.80) 9,111,714.17 15 - 1,372,785.75 10,484,499.92 20 - (8,159,472.30) 2,325,027.62 30 - 21,330.24 2,346,357.86 35 - (1,078,496.38) 1,267,861.48 40 - (434,210.00) 833,651.48 -----Original Message----- So, only on the second level you want to keep a running total and other levels to be normal. This should take care of that if I understand your goal correctly. IIF([Account].CurrentMember.Level.Name = "Level 02" , ([StatementCode].Parent, [Measures].[Total]) + ([Measures]. [Total]), [Measures].[Total]) -mike -----Original Message----- I tried your suggestion but it does not produce the required results. This would be acceptable. USDBal Running Total 5 - 14,665,974.97 14,665,974.97 10 - (5,554,260.80) 9,111,714.17 15 - 1,372,785.75 10,484,499.92 20 - (8,159,472.30) 2,325,027.62 30 - 21,330.24 2,346,357.86 35 - (1,078,496.38) 1,267,861.48 40 - (434,210.00) 833,651.48 -----Original Message----- Trevor, Can you try creating a calculated measures that is like so: ([StatementCode].Parent, [Measures].[Total]) + ([Measures]. [Total]) You may want to hide your original Measures.Total so it no longer shows up. At the top most level it will display simply the measures.total since there is no parent. All other levels will work as you need. -mike -----Original Message----- I have a Dimension called StatementCode which has 5 Levels. I would like to calculate a running total for the members of the second level (s2code). So instead of showing this (i hope the formatting is preserved): 5 - 14,665,974.97 10 - (5,554,260.80) 15 - 1,372,785.75 20 - (8,159,472.30) 30 - 21,330.24 35 - (1,078,496.38) 40 - (434,210.00) I would like to show this: 5 - 14,665,974.97 10 - 9,111,714.17 15 - 10,484,499.92 20 - 2,325,027.62 30 - 2,346,357.86 35 - 1,267,861.48 40 - 833,651.48 Please let me know if you need more information, any help is greatly appreciated. Also, I am running the Standard version of SQL 2000. Trevor . . . . . . |
![]() |
| Thread Tools | |
| Display Modes | |
| |