Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

Rollup children to Immediate Manager(Not higher than his level) when there is an Indicator 'Yes'(in Template) else stays at children level

$
0
0

Hi ,

I have 4 fact tables one of them has "regular" relationship with employe dimension(rest of them are many to many) I load the fact based on the template they Provide everymonth (hardly 500 transactions) for each transaction there can be Possible  Employee or manager  with an Indicator IsrolluptoManager(True) OR IsNOtRolluptoManager(False)

IDOperator
EmpID
TrsactIDTransactDateAmountCustomerDepartment
1True

   abc
afeafedf10/10/201075ABCx
2False   

abc
afeafedf10/10/201110fdfy
3False

   abc
erteqt10/10/20125wqwtfz
4True   

abc
afeag10/10/201325avsadgg

Manager Tom                      100 (Since operator is false we should not roll up to Manager level stays at empID level)

                      abc(EmpID)   115      

how we can Impement this?

I created new dimension([Flag])  with Key column and Operator attribute([Apply To Parent]) and populated that key in the fact table

when I slice with that dimension accros the measure is shows transactions with in True and transcation which are in false

Now in my mdx how can I control based on this new dimension with EmployeeDimension

 WITH

                                     MEMBER [MEASURES].[FY] AS ([Measures].[TaxRevenue])
                                 
                                      SELECT {
                
                                     ,[MEASURES].[FY]
                                  
                                    
                                 } ON 0 ,  
                         NON EMPTY
                        ( {DESCENDANTS( [Employee].[Manager Employee].&[201944]
                    ) }
                    ,Except([Trans].[Apply To Manager].members,[TRANS].[Apply To Manager].&[NO])
                    )FROM SALES
WHERE ([Date].[Date].&[20111023]
)
In above mdx I tried but it is not working, I guess I should not use except ,Something I need to work with Rollup  Can anyone suggest right approach on this with out using Unary OPerator feature in cube since my dimension slices accross 4 measure but I need this on only for one Measure

Any Ideas in implementation and mdx?

Thanks

Promethues





Viewing all articles
Browse latest Browse all 14337

Trending Articles



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