Quantcast
Channel: SQL Server Analysis Services Forum
Viewing all articles
Browse latest Browse all 2472

How to override SubTotal for Calculated Measure with Scope statement - Please this is urgent.

$
0
0

Hello experts.

I know this should not be tough and I knew how to do this but apparently I'm out of touch. I need somebody to get me out of my hole.

I need to calculate the subtotal for ALL (visible) MaterialIDs in the current month, that belong to the current Plant ID. The measure is a calculated measure called TestValue.

Here is my SCOPE statement:

SCOPE  ( [DimMaterialMaster].[Material ID].[ALL], [Measures].[TestValue] );  
    THIS = 
        SUM
        (
            (
                [DimPlantMaster].[Plant ID].CURRENTMEMBER, 
                [DimMaterialMaster].[Material ID].MEMBERS -- (also tried Children and siblings
            )   
           ,[Measures].[TestValue]
        );  
   BACK_COLOR (THIS) = 5884570;                                                     
    FORE_COLOR (THIS) = 0;    

END SCOPE;  
I just can't get the correct result!? I would expect the sub-total to be 18*500 = 9000 but my numbers are huge or none.

I'd really appreciate a quick hint.

Thx,

Dirk


Viewing all articles
Browse latest Browse all 2472

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>