In the meantime, here is a status bar you can drop into any [knock wood] base as needed.
As configured, it requires you to add three Formula fields, {BarGoal}
, {BarCurrent}
, and {StatusBar}
.
-
{BarGoal}
should be set to equal theABS()
value of whichever Airtable field contains your target goal. -
Assuming
{Current}
is the field containing your current measurement,{BarCurrent}
should be set toIF({Current},ABS({Current}),0)
-
{StatusBar}
should be configured for the following formula:
IF(
BarGoal,
REPT(
'█',
INT(
(IF(
BarCurrent<=BarGoal,
BarCurrent,
BarGoal
)/BarGoal)*18
)
)&
IF(
ROUND(
MOD(
(IF(
BarCurrent<=BarGoal,
BarCurrent,
BarGoal
)/BarGoal)*18,
1
),
0
)=1,
'▌'
)
)
As provided, the status bar is 18 characters wide at 100%; this width can be varied by replacing the value ‘18’ with your preferred width. The status bar maxes out at 100%, and blank values of {BarCurrent}
are treated as zero (0). The formulas for {BarGoal}
and {BarCurrent}
take the absolute values of your goal and current metrics to avoid generating errors, but negative target or current values probably won’t work the way you expect.
Optionally, the status bar can be preceded with the current percent of goal reached by using the following formula:
IF(
BarGoal,
REPT(
' ',
3-LEN(
INT(
(IF(
BarCurrent<=BarGoal,
BarCurrent,
BarGoal
)/BarGoal)*100
)&''
)
)&
INT(
(IF(
BarCurrent<=BarGoal,
BarCurrent,
BarGoal
)/BarGoal)*100
)&
'% '&
REPT(
'█',
INT(
(IF(
BarCurrent<=BarGoal,
BarCurrent,
BarGoal
)/BarGoal)*18
)
)&
IF(
ROUND(
MOD(
(IF(
BarCurrent<=BarGoal,
BarCurrent,
BarGoal
)/BarGoal)*18,
1
),
0
)=1,
'▌'
)
)