Quantcast
Channel: Excel IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 11829

Excel add Pivot Table column MDX

$
0
0

I'm new to MDX, trying to learn, does not seems easy as SQL.

I extract data from a cube within excel :

I would like to add a column that would be :  COL2 - COL3

I know I need to go in OLAP Tool, create a MDX Calculated Member or Calculated Measures.... but I don't know how to formulate my MDX Query. Everywhere I find some sample of MDX Query they are all part of a complete select statement which does not help to understand.

I just want a calculated column :  Col2 - Col3  .  How do I do that ?

 

here is the underlying MDX query :

SELECT NON EMPTY 
      Hierarchize(
                  {DrilldownLevel
                 ({
                    [Dim Sélection Période].[Par Sélection Période].[All]
                  },,,INCLUDE_CALC_MEMBERS
                 )}
                 ) ON COLUMNS,
      NON EMPTY 
      Hierarchize(
                  {DrilldownLevel
                 ({[Dim Type Budget].[Budget des ventes].[All]
                  },,,INCLUDE_CALC_MEMBERS
                 )}
                 ) ON ROWS  
   FROM (
          SELECT (
		          {
                   [Dim Sélection Période].[Par Sélection Période].[Périodique].&[60], 
                   [Dim Sélection Période].[Par Sélection Période].[Périodique].&[50], 
                   [Dim Sélection Période].[Par Sélection Période].[Périodique].&[30]
                  }
				   ) ON COLUMNS , 
                 ({
                   [Dim Type Budget].[Budget des ventes].&[6], 
                   [Dim Type Budget].[Budget des ventes].&[5], 
                   [Dim Type Budget].[Budget des ventes].&[4], 
                   [Dim Type Budget].[Budget des ventes].&[3], 
                   [Dim Type Budget].[Budget des ventes].&[2], 
                   [Dim Type Budget].[Budget des ventes].&[1], 
                   [Dim Type Budget].[Budget des ventes].&[0]
                   }) ON ROWS  
          FROM [Canac DM Ventes Client Mag]) 
          WHERE ([Measures].[Montant Vente]) 

 

 

 

 


k.r.



Viewing all articles
Browse latest Browse all 11829

Trending Articles



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