Home > WebEOC > Admin Guide > Board Building Tips > Percentages in WebEOC

Percentages in WebEOC

Table of contents
No headers

Within WebEOC, there isn't yet a way to display a number as an expression. However, you can use an expression to calculate your percentage and format the number so it makes sense. Below is an example of using such an expression to display the percentage of occupancy for each of your shelters. It can be placed anywhere within the <eocrepeatallrecords> tag. 

<if test="1=0">
<expression name="PercentageOccupied">
cast(round((cast(isNull(Occupancy,0) as float) / cast(isNull(Capacity,1) as float)) * 100, 4) as nvarchar(40))
<value-of select="format-number(@PercentageOccupied, '#0.00')"/>%

If you want a total percentage, such as the total percentage of occupancy across all shelters, you can use the following code. Note:

Note: This code needs to be placed outside the <eocrepeatallrecords> tag.

<if test="1=0">
<expression name="TotalPercentageOccupied">
cast(round((cast(isNull(sum(Occupancy),0) as float) / cast(isNull(sum(Capacity),1) as float)) * 100, 4) as nvarchar(40))
<value-of select="format-number(//@TotalPercentageOccupied, '#0.00')"/>%
You must to post a comment.
Last modified



This page has no classifications.