Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: sheet ::

unpublished constants group DataPilotFieldReferenceType
Usage Restrictions
not published
Description
These constants select different types of References to calculate the data fields.

Constants
NONE This type means, that the results in the data fields are displayed like they are.  
ITEM_DIFFERENCE From each result, its reference value (see below) is subtracted, and the difference is shown. Totals outside of the base field are shown as empty results.  
ITEM_PERCENTAGE Each result is divided by its reference value. The reference value is determined in the same way as for DataPilotFieldReferenceType::ITEM_DIFFERENCE. Totals outside of the base field are shown as empty results.  
ITEM_PERCENTAGE_DIFFERENCE From each result, its reference value is subtracted, and the difference divided by the reference value. The reference value is determined in the same way as for DataPilotFieldReferenceType::ITEM_DIFFERENCE. Totals outside of the base field are shown as empty results.  
RUNNING_TOTAL Each result is added to the sum of the results for preceding items in the base field, in the base field's sort order, and the total sum is shown.  
ROW_PERCENTAGE Each result is divided by the total result for its row in the DataPilot table.  
COLUMN_PERCENTAGE Same as DataPilotFieldReferenceType::ROW_PERCENTAGE, but the total for the result's column is used.  
TOTAL_PERCENTAGE Same as DataPilotFieldReferenceType::ROW_PERCENTAGE, but the grand total for the result's data field is used.  
INDEX The row and column totals and the grand total, following the same rules as above, are used to calculate the following expression.  
Constants' Details
NONE
const long NONE = 0;
Description
This type means, that the results in the data fields are displayed like they are.
ITEM_DIFFERENCE
const long ITEM_DIFFERENCE = 1;
Description
From each result, its reference value (see below) is subtracted, and the difference is shown. Totals outside of the base field are shown as empty results.

Named Item

If a base item name is specified, the reference value for a combination of field items is the result where the item in the base field is replaced by the specified base item.

If the reference value isn't shown in the DataPilot table because of hidden details for a parent field, the difference isn't calculated and an error value is shown.

If the result for an item combination is empty, the value 0 is used for the difference, even if the summary function is undefined without values, like average or variance. The difference is shown in the result table even if the original result was empty.

The difference for item combinations containing the base item is shown as empty result.

Previous or Next

If "previous" or "next" is specified as the base item, the reference value is the result for the next visible member of the base field, in the base field's sort order. If details for one item in the base field are hidden, that item is skipped. The difference for the item with hidden details isn't calculated, not even for the item's summary, to have a consistent order of previous and next items.

Empty results are handled as for named items (see above).

The difference for the first (for com::sun::star::sheet::DataPilotFieldReferenceItemType::PREVIOUS) or last (for com::sun::star::sheet::DataPilotFieldReferenceItemType::NEXT) item of the base field is shown as empty result.

ITEM_PERCENTAGE
const long ITEM_PERCENTAGE = 2;
Description
Each result is divided by its reference value. The reference value is determined in the same way as for DataPilotFieldReferenceType::ITEM_DIFFERENCE. Totals outside of the base field are shown as empty results.

Division by zero results in an error. Otherwise, empty results are shown as 0. Results for the base item, first (for com::sun::star::sheet::DataPilotFieldReferenceItemType::PREVIOUS) or last (for com::sun::star::sheet::DataPilotFieldReferenceItemType::NEXT) item of the base field are shown as 1 if not empty.

ITEM_PERCENTAGE_DIFFERENCE
const long ITEM_PERCENTAGE_DIFFERENCE = 3;
Description
From each result, its reference value is subtracted, and the difference divided by the reference value. The reference value is determined in the same way as for DataPilotFieldReferenceType::ITEM_DIFFERENCE. Totals outside of the base field are shown as empty results.

Division by zero results in an error. Otherwise, the rules for DataPilotFieldReferenceType::ITEM_DIFFERENCE apply.

RUNNING_TOTAL
const long RUNNING_TOTAL = 4;
Description
Each result is added to the sum of the results for preceding items in the base field, in the base field's sort order, and the total sum is shown.

If details for one item in the base field are hidden, that item isn't included in calculating the sum, and results for that item are shown as error, to ensure consistency between details and subtotals for the following items.

Results are always summed, even if a different summary function was used to get each result.

Totals outside of the base field are shown as empty results.

ROW_PERCENTAGE
const long ROW_PERCENTAGE = 5;
Description
Each result is divided by the total result for its row in the DataPilot table.

If there are several data fields, the total for the result's data field is used.

If there are subtotals with manually selected summary functions, still the total with the data field's summary function is used.

Division by zero results in an error.

Otherwise, empty results remain empty.

COLUMN_PERCENTAGE
const long COLUMN_PERCENTAGE = 6;
Description
Same as DataPilotFieldReferenceType::ROW_PERCENTAGE, but the total for the result's column is used.
TOTAL_PERCENTAGE
const long TOTAL_PERCENTAGE = 7;
Description
Same as DataPilotFieldReferenceType::ROW_PERCENTAGE, but the grand total for the result's data field is used.
INDEX
const long INDEX = 8;
Description
The row and column totals and the grand total, following the same rules as above, are used to calculate the following expression.

( original result * grand total ) / ( row total * column total )

Division by zero results in an error. Otherwise, empty results remain empty.

Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.