Vote button trans.png
April's Project of the Month
It's spring time. It's primary election season!
Click here to find all the information you'll need to cast your ballot.




Difference between revisions of "Template:Net worth table"

From Ballotpedia
Jump to: navigation, search
Line 5: Line 5:
 
--><tr><th>Year</th><th>Avg. Net Worth</th><th>% Difference from previous year</th></tr><!--
 
--><tr><th>Year</th><th>Avg. Net Worth</th><th>% Difference from previous year</th></tr><!--
  
-->{{#if:{{{Year 5|}}}|<tr><td style="text-align:center">{{{Year 5}}}</td><td style="text-align:center">${{formatnum:{{{Average 5|0}}}}}</td><td style="text-align:center">{{#ifexpr:{{{Average 4|}}} > 0|{{formatnum:{{#expr:(({{{Average 5|0}}} - {{{Average 4|0}}})/{{{Average 4|0}}}*100)round2}}}}|{{formatnum:{{#expr:(({{{Average 5|0}}} - {{{Average 4|0}}})/{{{Average 4|0}}}*-100)round2}}}}}}%</td></tr>|}}<!--
+
-->{{#if:{{{Year 5|}}}|<tr><td style="text-align:center">{{{Year 5}}}</td><td style="text-align:center">${{formatnum:{{{Average 5|0}}}}}</td><td style="text-align:center">{{#ifexpr:{{{Average 4|}}} = 0|N/A|{{#ifexpr:{{{Average 4|}}} > 0|{{formatnum:{{#expr:(({{{Average 5|0}}} - {{{Average 4|0}}})/{{{Average 4|0}}}*100)round2}}}}|{{formatnum:{{#expr:(({{{Average 5|0}}} - {{{Average 4|0}}})/{{{Average 4|0}}}*-100)round2}}}}}}%}}</td></tr>|}}<!--
  
 
-->{{#if:{{{Year 4|}}}|<tr><td style="text-align:center">{{{Year 4}}}</td><td style="text-align:center">${{formatnum:{{{Average 4|0}}}}}</td><td style="text-align:center">{{#ifexpr:{{{Average 3|}}} > 0|{{formatnum:{{#expr:(({{{Average 4|0}}} - {{{Average 3|0}}})/{{{Average 3|0}}}*100)round2}}}}|{{formatnum:{{#expr:(({{{Average 4|0}}} - {{{Average 3|0}}})/{{{Average 3|0}}}*-100)round2}}}}}}%</td></tr>|}}<!--
 
-->{{#if:{{{Year 4|}}}|<tr><td style="text-align:center">{{{Year 4}}}</td><td style="text-align:center">${{formatnum:{{{Average 4|0}}}}}</td><td style="text-align:center">{{#ifexpr:{{{Average 3|}}} > 0|{{formatnum:{{#expr:(({{{Average 4|0}}} - {{{Average 3|0}}})/{{{Average 3|0}}}*100)round2}}}}|{{formatnum:{{#expr:(({{{Average 4|0}}} - {{{Average 3|0}}})/{{{Average 3|0}}}*-100)round2}}}}}}%</td></tr>|}}<!--

Revision as of 18:09, 14 January 2014

{{{Name}}} Yearly Net Worth
YearAvg. Net Worth% Difference from previous year
[edit] Template-info.png Template documentation

Usage

Copy and paste the code below and expand for as many years as necessary, up to 5.

{{Net worth table
|Collapse=
|Name =
|Political Party =
|Year 1 =
|Average 1 =
|Year 2 =
|Average 2 =
|Year 3 =
|Average 3 =
}}

Year 1 will be the oldest year of data you have. The table will automatically put the newest year of data first.

Example

NAME Yearly Net Worth
YearAvg. Net Worth% Difference from previous year
2014$10,000N/A
2013$0100%
2012$-40098.92%
2011$-37,000-100.68%
2010$5,412,358N/A
Growth from 2010 to 2012:N/A