Skip to Main Content
MDX Solutions: With Microsoft® SQL Server™ Analysis Services 2005 and Hyperion® Essbase, Second Edition
book

MDX Solutions: With Microsoft® SQL Server™ Analysis Services 2005 and Hyperion® Essbase, Second Edition

by George Spofford, Sivakumar Harinath, Christopher Webb, Dylan Hai Huang, Francesco Civardi
March 2006
Intermediate to advanced content levelIntermediate to advanced
744 pages
16h 7m
English
Wiley
Content preview from MDX Solutions: With Microsoft® SQL Server™ Analysis Services 2005 and Hyperion® Essbase, Second Edition

Appendix D. Format String Codes

Calculated members and cell calculations can specify the formatting applied to a cell value to transform it into a formatted value. The formatted value is a text string, whereas the raw value can be numeric or textual (and a numeric cell could represent a date or time serial number). This appendix lays out the codes specified by OLE DB for OLAP and used by Microsoft's OLAP, Analysis Services 2000, and Analysis Services 2005. The codes match the format arguments used by the Visual Basic Format() function.

Formatting Numeric Values

A format expression for numeric values can have from one to four sections, each section separated by semicolons. If the format argument contains one of the named numeric formats, only one section can be used. Table D-1 lists the section usage and interpretations of sections in format strings.

The following example has one section, and formats a number with two decimal places:

"#.00"

Table D-1. Format String Sections and Interpretations

SECTION USAGE

INTERPRETATION

One section

The format expression applies to all values.

Two sections

The first section applies to positive values and zeros, the second to negative values.

Three sections

The first section applies to positive values, the second to negative values, and the third to zeros.

Four sections

The first section applies to positive values, the second to negative values, the third to zeros, and the fourth to null values.

The following example has two sections. The first section defines the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Professional SQL Server™ Analysis Services 2005 with MDX

Professional SQL Server™ Analysis Services 2005 with MDX

Sivakumar Harinath, Stephen R. Quinn
Professional Microsoft® SQL Server® Analysis Services 2008 with MDX

Professional Microsoft® SQL Server® Analysis Services 2008 with MDX

Sivakumar Harinath, Matt Carroll, Sethu Meenakshisundaram, Robert Zare, Denny Guang-Yeu Lee
Microsoft® SQL Server™ 2008 Analysis Services Unleashed

Microsoft® SQL Server™ 2008 Analysis Services Unleashed

Irina Gorbach, Alexander Berger, Edward Melomed

Publisher Resources

ISBN: 9780471748083Purchase book