How to show a progress bar in a SharePoint list column
For a Number column, open the column menu, select Column settings, then Format this column, and choose Data bars. No code is needed. For your own colors or a fixed 0 to 100 scale, switch to Advanced mode and paste the JSON below.
What kind of column can show a progress bar?
Use a Number column that holds a value from 0 to 100. Microsoft supports data bars on Number columns. Check the column type before you start. A Single line of text column does not work.
A Number column set to show as a percentage stores 50 percent as 0.5. In the JSON, change each @currentField to @currentField * 100.
How do you add the bar?
- Open the list and point to the column name.
- Select the arrow beside the name, then Column settings, then Format this column.
- Choose Data bars and select Save. That is the built-in bar.
- For the custom bar, select Advanced mode at the bottom of the pane instead.
- Paste the JSON below, check the preview, then select Save.
What JSON do you paste?
This block draws a grey track with a blue bar. The bar width equals the number in the cell, as a percent of the track.
{"$schema":"https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json","elmType":"div","style":{"width":"100%","background-color":"#e1dfdd","height":"14px"},"children":[{"elmType":"div","style":{"width":"=if(@currentField > 100, '100%', toString(@currentField) + '%')","background-color":"#0078d4","height":"14px"}}]}
Column formatting applies to the column in every view of the list. If the JSON has an error, the preview shows it. Fix it before you select Save.
Can the bar change color by value?
Yes. Replace the fixed background color with an if expression, for example red under 30 and green at 100. The same if pattern works on a date column. See "turning overdue rows red".
Why does the bar not appear?
- The column is text, not Number. Change the column type, or add a Number column for progress.
- The value is above 100. The JSON above caps the bar at full width.
- The list opens in classic SharePoint. Column formatting shows only in the modern experience.
- The JSON has a missing quote or bracket. Use Preview to find it.
Does the bar change the stored data?
No. Column formatting changes only how the cell looks. The number stays in the list, so you can still sort, filter and total it. You can also average progress for a group. See "totals in a list view".
What if the progress value should come from other columns?
Build the number first with a formula, then format it. See "calculated column formulas". A card layout can be easier to scan than a table. See "the gallery view guide".
FAQ
Can I add a progress bar without writing JSON?
Yes, for a Number column. Open Column settings, then Format this column, and choose Data bars. Use Advanced mode only when you want your own colors or a fixed 0 to 100 scale.
Does the progress bar work on a text column?
No. The column must be a Number column. Change the column type, or add a Number column for progress.
Will the progress bar change the numbers in my list?
No. Column formatting changes only how the cell looks. You can still sort, filter and total the number.
Sources
- Microsoft Support, Format a column to change how it looks
- Microsoft Learn, Use column formatting to customize SharePoint