OWC, Pivot table, AddCalculatedField et MDX
Bonjour,
OWC et un objet qui rend pas mal de services. Il est facile à manipuler sous MS Office, mais à programmer c'est horrible.
Qqn a-t-il déjà fait appel à cet objet?
Je souhaite ajouter un champ dont la valeur totale est un pourcentage calculé sur un autre total.
Sur MSDN, ils donnent cet exemple:
Code:
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 |
Je ne comprend pas du tout la syntaxe MDX.
Qqn peut-il m'eclairer?
Aussi, d'autres ont-ils réussis à faire fonctionner les pages web générées par Access?
Merci bcp.