![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello All, I'm trying to create aggregations for a cube using DSO. I looked for a piece of code that would help me out but I couldn't find any. All the example codes are using the PartitionAnalyzer. I know how I'm going to query the cube exactly so I don't want to create extra aggregations. I tried something like this (to query in 3 dimensions for measure Trx Count) but it doesn't seem to work. Any help will be appreciated. Set dsoPartition = dsoCube.MDStores(1) Set dsoAggregation = dsoPartition.MDStores.AddNew("BranchTrxDate") dsoAggregation.Dimensions.AddNew ("ImportDimBranch") dsoAggregation.Dimensions.AddNew ("ImportDimTran") dsoAggregation.Dimensions.AddNew ("ImportDimDate") dsoAggregation.Measures.AddNew ("Trx Count") dsoCube.Update dsoCube.Process processFull Cagdas Ucar (Chadash Uchar) Exametric, Inc. Software Engineer |
#3
| |||
| |||
|
|
Cagdas, Here's some sample code from a sample application that ships with the SQL 2k Resource Kit and the Accelerator (which you can download at www.microsoft.com/solutions/bi). After you install the Accelerator a tools directory will be created on your disk that contains an application called the Partition Aggregation Utility. It includes the source code. Basically, what you're missing is that aggregations are made up of dimension levels. Sean -- Sean Boon SQL Server BI Product Unit **This posting is provided AS IS, with no warranties, and confers no rights.** 'Create new aggregations For aggCounter = 0 To lstAgg(0).ListItems.Count - 1 Set dsoAgg = m_dsoPart.MDStores.AddNew("CustomAgg" & CStr(aggCounter)) dsoAgg.IsDefault = True For dimCounter = 0 To numDims - 1 Set dsoAggDim = dsoAgg.Dimensions(lblDimName(dimCounter)) For levCounter = 1 To imgCmbLevs(dimCounter).ComboItems(lstAgg(dimCounte r).ListItems(aggCounter + 1).Text).Index If Not imgCmbLevs(dimCounter).ComboItems(levCounter).Inde x = 1 Then dsoAggDim.Levels.AddNew imgCmbLevs(dimCounter).ComboItems(levCounter) End If Next Next Next "Cagdas Ucar" <cagdas.ucar (AT) exametric (DOT) com> wrote in message news:#acD3CmdDHA.2340 (AT) TK2MSFTNGP09 (DOT) phx.gbl... Hello All, I'm trying to create aggregations for a cube using DSO. I looked for a piece of code that would help me out but I couldn't find any. All the example codes are using the PartitionAnalyzer. I know how I'm going to query the cube exactly so I don't want to create extra aggregations. I tried something like this (to query in 3 dimensions for measure Trx Count) but it doesn't seem to work. Any help will be appreciated. Set dsoPartition = dsoCube.MDStores(1) Set dsoAggregation = dsoPartition.MDStores.AddNew("BranchTrxDate") dsoAggregation.Dimensions.AddNew ("ImportDimBranch") dsoAggregation.Dimensions.AddNew ("ImportDimTran") dsoAggregation.Dimensions.AddNew ("ImportDimDate") dsoAggregation.Measures.AddNew ("Trx Count") dsoCube.Update dsoCube.Process processFull Cagdas Ucar (Chadash Uchar) Exametric, Inc. Software Engineer |
![]() |
| Thread Tools | |
| Display Modes | |
| |