Bonjour,
J'utilise un composant OWC pour faire un tableau croisé en ASP. Je souhaite ajouter un champ dont la valeur totale est un pourcentage calculé sur un autre total.
Apparement, je dois passer par du MDX
Sur MSDN, ils donnent cet exemple:
Je ne comprend pas du tout la syntaxe MDX.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 Sub TestAddCalculatedTotal() Dim strExp Dim totCalcTotal Dim vwView Set vwView = PivotTable1.ActiveView ' The MDX expression used for the new calculated total. strExp = "([Measures].[Store Sales], Time.PrevMember)" ' Create the new calculated total. Set totCalcTotal = vwView.AddCalculatedTotal _ ("Sales in Last Period", "Sales in Last Period", strExp) ' Insert the calculated total in the data area of the PivotTable. vwView.DataAxis.InsertTotal totCalcTotal End Sub
Qqn peut-il m'eclairer?
Merci bcp.
Partager