Dear allI'm new to SSAS and MDX and need your help on my current project. What I need to do is to insert the MDX query result to sql table.Here's the scenario:Let's suppose the data is from [AdventureWorksCube] the Measure is [Net sales], I need to pull out the net sales data for certain prodcuts and use it to calculate the rebate amount by multiplying cetain rebate percentage.Here's a sample MDX query under Management studio:select {[Measures].[Net Sales]} on 0,{[Account].[Bill to account]} on 1from [AdventureWorksCube]where ([Product].[productCategory].[Product Code], [Date].[Month Year].[Aug-14], [Scenario].[Scenario1], [Factory].[FactoryID])The output of the query will be like what's in below:BillTo Net sales345353 $79536261 $829489202 $9303573982 $8933I need to insert the query result along with all the members in the where clause to a SQL table in below.The fact is that one BillTo might contain sales amount for multiple product codeBillTo Netsales ProductCode MonthYear Scenario FactoryID345353 $79 1 aug-14 1 01536261 $523 2 aug-14 1 02536261 $306 3 aug-14 1 01489202 $5303 4 aug-14 1 02489202 $2000 5 aug-14 1 01489202 $2000 6 aug-14 1 02573982 $2220 7 aug-14 1 01573982 $4000 8 aug-14 1 01573982 $2713 9 aug-14 1 02Question #1: how to populate the above table to include the query result and members in where clauseQuestion #2: how to use parameters to make the query dynamic? The above table needs to be loaded monthly with every month's transaction with different productcodeand different
↧