Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

Showing the Percentage of Time Passed as a Progress Bar

Topic Labels: Formulas
Solved
Jump to Solution
1982 3
cancel
Showing results for 
Search instead for 
Did you mean: 
MegKrashCourse
5 - Automation Enthusiast
5 - Automation Enthusiast

Hey Wonderful Community! 

I am currently having an issue with a formula that I am trying to show as a progress bar. Here are the specifics: 

I am calculating the percetage of time passed between a start date and an end date. The formula seems to be correct: 

ROUND((DATETIME_DIFF(NOW(), {Start Date}, 'days') / DATETIME_DIFF({End Date}, {Start Date}, 'days')) * 100, 2)
 
However, when I go into the "Formatting" section of the Formula Field, it gives me a very large percentage which seems to be incorrect (in this particular case the preview shows 345600% but in the formula section, the preview shows 35.56%. I have attached the two images of the settings below: 
 
Please can someone help me? xx
1 Solution

Accepted Solutions
TheTimeSavingCo
18 - Pluto
18 - Pluto

Try removing the *100:

ROUND((DATETIME_DIFF(NOW(), {Start Date}, 'days') / DATETIME_DIFF({End Date}, {Start Date}, 'days')), 2)

Screenshot 2024-04-03 at 10.44.23 PM.png

If you're displaying it as a bar you can try removing the ROUND too as there isn't much of a difference visually I reckon

Link to base

See Solution in Thread

3 Replies 3

Hello @MegKrashCourse 

You've done nothing wrong here. The formula is correct but airtable just used a different approach(nature) to handle the formula field.
Go to this official help page https://support.airtable.com/docs/number-based-fields-in-airtable#percent-fields
Read this and more.

The percentage field type hosts numerical values formatted as percentages. The values in a percent field are shown as fractions of 100 with the percent symbol. For example, .75 in a percent field is represented as 75%.  

If you still can't understand then see other user has same issues https://community.airtable.com/t5/development-apis/percent-field-is-appending-0-0-to-the-value-i-try...

Let me know more.

👍

TheTimeSavingCo
18 - Pluto
18 - Pluto

Try removing the *100:

ROUND((DATETIME_DIFF(NOW(), {Start Date}, 'days') / DATETIME_DIFF({End Date}, {Start Date}, 'days')), 2)

Screenshot 2024-04-03 at 10.44.23 PM.png

If you're displaying it as a bar you can try removing the ROUND too as there isn't much of a difference visually I reckon

Link to base

Oh my gosh! You're amazing! Thank you so much!