ଛାଞ୍ଚ:Percent and number
This template may be used to generate a percentage of total followed by the number. For the reverse, see {{number and percent}}.
Usage
[ସମ୍ପାଦନା]{{percent and number|number|total}}
{{percent and number|number|total|decimals to round to (zero or greater)}}
Optional parameters
[ସମ୍ପାଦନା]For two-column table output, use |disp=table
To insert a line break before the parenthetical expression, use |disp=br()
To add a prefix to the numbers, use |prefix=
; for example, prefix=$
To add a suffix to the number, use |suffix=
; for example, suffix= units
To pad the result with zeros to achieve the desired precision, use |pad=yes
.
To override the default right alignment in table mode, use |align=left
or |align=center
.
Basic examples
[ସମ୍ପାଦନା]{{percent and number|3333|20000}}
→ ୧୭% (୩,୩୩୩)
{{percent and number|3333|20000|3}}
→ ୧୬.୬୬୫% (୩,୩୩୩)
{{percent and number|3,333|20,000}}
→ ୧୭% (୩,୩୩୩)
{{percent and number|3,333|20,000|3}}
→ ୧୬.୬୬୫% (୩,୩୩୩)
{{percent and number|111|1000|4|pad=yes}}
→ ୧୧.୧000% (୧୧୧)
{{percent and number|3333|20000|disp=br()}}
→ ୧୭%
(୩,୩୩୩)
Table display
[ସମ୍ପାଦନା]{| class="wikitable sortable" |- ! Location !! Percentage !! Population |- | City A || {{percent and number|5000|12000|disp=table}} |- | City B || {{percent and number|6500|12000|disp=table}} |- | City C || {{percent and number|500|12000|disp=table}} |}
Location | Percentage | Population |
---|---|---|
City A | ୪୨% | ୫,୦୦୦ |
City B | ୫୪% | ୬,୫୦୦ |
City C | ୪% | ୫୦୦ |
See also
[ସମ୍ପାଦନା]- {{percentage}}
- {{number and percent}}