Difference between revisions of "Multiple formats in one table"

(Mention of cell-level format alternative in 5.0)
 
Line 1: Line 1:
 
[[Category:Analytica User Guide]]
 
[[Category:Analytica User Guide]]
 
<breadcrumbs>Analytica User Guide > Number and table formats> {{PAGENAME}}</breadcrumbs>
 
<breadcrumbs>Analytica User Guide > Number and table formats> {{PAGENAME}}</breadcrumbs>
 +
{{ReleaseBar}}
  
 
+
{{Release||4.6|Usually, the same [[Number formats|number format]] applies to all numbers in a table (except its index values in column or row headers, which use the format set for the index variable). Sometimes, you might want to use different formats for different rows (more generally, [[slice]]s) of a table. You can do this if you define the table as a list of variables, for example:}}
Usually, the same [[Number formats|number format]] applies to all numbers in a table (except its index values in column or row headers, which use the format set for the index variable). Sometimes, you might want to use different formats for different rows (more generally, [[slice]]s) of a table. You can do this if you define the table as a list of variables, for example:
+
{{Release|5.0||You can change the [[number format]] for a subset of cells in a table by selecting those cells and then bringing up the [[Number Format Dialog]]. This is intuitive, but it is often easier and preferable for your table to infer the number formats for each slice from the number formats of its parent variables. This happens if you define the result as a list of variables, for example:}}
  
 
:<code>Index Years := 2007..2012</code>
 
:<code>Index Years := 2007..2012</code>
Line 23: Line 24:
 
* [[Numbers and text]]
 
* [[Numbers and text]]
 
* [[Datatype functions]]
 
* [[Datatype functions]]
 
+
* [[Cell format dialog]]
 +
* [[MultiTable]]s
  
  
 
<footer>Display of constraint results / {{PAGENAME}} / Graphs</footer>
 
<footer>Display of constraint results / {{PAGENAME}} / Graphs</footer>

Latest revision as of 00:44, 25 July 2017



Release:

4.6  •  5.0  •  5.1  •  5.2  •  5.3  •  5.4  •  6.0  •  6.1  •  6.2  •  6.3  •  6.4  •  6.5



You can change the number format for a subset of cells in a table by selecting those cells and then bringing up the Number Format Dialog. This is intuitive, but it is often easier and preferable for your table to infer the number formats for each slice from the number formats of its parent variables. This happens if you define the result as a list of variables, for example:

Index Years := 2007..2012
Variable DollarX := Table(Years)(...) { Formatted as dollars }
Variable PercentX := DollarX/40K { Formatted as percent }
Variable MultiformatX := [DollarX, PercentX]
MultiformatX →
Chapter7 8.png

This table uses the number format set for each variable responsible for a row here — as long as you don’t override their settings by setting a format for MultiformatX.

See Also


Comments


You are not allowed to post comments.