Difference between revisions of "Grid Calculations"

(Examples (based on the Bicycle Sales cube))
Line 30: Line 30:
 
There are two methods to achieve the desired result: the first uses Excel functionality outside of the XLCubed grid, the second uses XLCubed grid calculation functionality referring to cell locations.
 
There are two methods to achieve the desired result: the first uses Excel functionality outside of the XLCubed grid, the second uses XLCubed grid calculation functionality referring to cell locations.
  
===Option 1 - using Excel functionality===
+
===Option 1: using Excel functionality===
  
 
  [[Image:GC1.png|350px|centre]]
 
  [[Image:GC1.png|350px|centre]]
Line 48: Line 48:
 
[[Image:GC4.png|350px|centre]]
 
[[Image:GC4.png|350px|centre]]
  
===Option 2 - using XLCubed Grid Calculations===
+
===Option 2: using XLCubed Grid Calculations===
  
 
1. Add a grid calculation  
 
1. Add a grid calculation  
Line 62: Line 62:
 
[[Image:GC7.png|350px|centre]]
 
[[Image:GC7.png|350px|centre]]
  
4. Uncheck anything in the ‘Attached to’ area and also select ‘Insert at end’.
+
4. Uncheck anything in the ''Attached to'' area and also select ''Insert at end''.
  
 
[[Image:GC4.png|350px|centre]]
 
[[Image:GC4.png|350px|centre]]
Line 68: Line 68:
 
5. The screenshot above shows that the calculation has been done for all rows.
 
5. The screenshot above shows that the calculation has been done for all rows.
  
==Member Selector - Adhoc Groupings==
+
==Member Selector and Adhoc Groupings==
  
 
Users can quickly add custom groupings into their reporting, with the calculations then available for selection from the member selector across all grids and formulae sharing the same cube connection within the workbook. This is done on the right click menu in the member selector as shown below:
 
Users can quickly add custom groupings into their reporting, with the calculations then available for selection from the member selector across all grids and formulae sharing the same cube connection within the workbook. This is done on the right click menu in the member selector as shown below:
Line 87: Line 87:
 
[[image:GridCalc7.png|centre|300px]]
 
[[image:GridCalc7.png|centre|300px]]
  
== Share to Base - Calculated Value on Measures ==
+
== Share to Base: Calculated Value on Measures ==
  
 
For measures, users can add a calculation which will show percentage contribution to specific levels in a chosen hierarchy. This is available in the member selector for measures, on the right click menu as shown below.
 
For measures, users can add a calculation which will show percentage contribution to specific levels in a chosen hierarchy. This is available in the member selector for measures, on the right click menu as shown below.

Revision as of 17:16, 29 August 2012

The Add Calculation option is available on the Grid's right mouse button pop-up menu.

For example, if you have the Time hierarchy on the columns and right click to add a Grid Calculation to Q2 you can add an additional Q2-Q1 delta column to the Grid. The column is inserted as an empty column to which you can add a title and formula. The formula can be typed into any of the cells, and will be propagated to all the other cells in the row or column automatically.

This column will be automatically refreshed as you drill or swap dimensions.

You can view or delete the inserted rows/columns on the XLCubed > Calculation > Manage Calculations form.

Video demonstration

Click here for videos showing grid calcualtions.

Examples (based on the Bicycle Sales cube)

We want to see the difference between 2004 and 2003 in a Grid.

  1. Insert a Grid based on the Bicycle Sales demo cube, with the Time hierarchy on columns
  2. Drill down Time's All member by double-clicking on B5:
  3. GridCalculationsExample1.png
  4. Right-click on 2004 (E5) and choose XLCubed > Add Calculation
  5. GridCalculationsExample2.png
  6. In the title cell (Calc, F5), type a name for the Calculation:
  7. GridCalculationsExample3.png
  8. In one of the column's data cells (for example, F6) type the formula for the Calculation, =E6-D6. You may need to resize the column:
  9. GridCalculationsExample4.png
  10. The Grid Calculation column will now be used, even if the structure of the Grid is changed:
  11. GridCalculationsExample5.png

More examples - Grid Calculations

This is how you can add a grid calculation that is not tied to members.

A typical scenario would be a grid report that needs to show two different years on columns where the years can change.

There are two methods to achieve the desired result: the first uses Excel functionality outside of the XLCubed grid, the second uses XLCubed grid calculation functionality referring to cell locations.

Option 1: using Excel functionality

GC1.png

1. Use Excel to create a calculation outside of the grid – in this example enter formula in cell E6 as follows: =C6+D6

2. As you can see in the screenshot below, Excel has filled in the sum of C6+D6

GC2.png

3. Right-click grid, Properties and on Behaviour tab check Fill Formulae next to Grid.

GC3.png

4. You can see the calculation has been done for all rows in grids.

GC4.png

Option 2: using XLCubed Grid Calculations

1. Add a grid calculation

GC5.png

2. Right-click to edit the calculation

GC6.png

3. In the window above delete everything in the Value area and enter a formula that refers to the cell locations eg =C6+D6.

GC7.png

4. Uncheck anything in the Attached to area and also select Insert at end.

GC4.png

5. The screenshot above shows that the calculation has been done for all rows.

Member Selector and Adhoc Groupings

Users can quickly add custom groupings into their reporting, with the calculations then available for selection from the member selector across all grids and formulae sharing the same cube connection within the workbook. This is done on the right click menu in the member selector as shown below:

GridCalc1.png
GridCalc2.png


  1. Choose the members to group, and select group members.
  2. Then name the grouping as required, and choose the parent element which the group is to appear under.
GridCalc3.png


The new element will appear as a custom calculation. If you wish to amend or delete it, select the custom calculation tab on the XLCubed ribbon.

GridCalc7.png

Share to Base: Calculated Value on Measures

For measures, users can add a calculation which will show percentage contribution to specific levels in a chosen hierarchy. This is available in the member selector for measures, on the right click menu as shown below.

GridCalc4.png
GridCalc5.png


  1. In this example a calculation is added to show the Reseller sales amount
  2. as a percentage of the parent at the country level in the Geography hierarchy.
GridCalc6.png