Formatting Tables in Power BI
A table in Power BI lays data out in rows and columns, similar to a spreadsheet. On its own it is plain, just values in a grid, but Power BI gives you real control over how that grid looks and behaves, from simple style presets to conditional formatting that changes a cell’s color or adds a bar based on its value.
Building a Table
In the Visualizations pane, click the Table icon. This adds an empty table visual to the report canvas. Drag the fields you want into the Columns section, in the order you want them to appear left to right. Numeric fields such as sales or count will automatically total up if you add a totals row, which is covered below.
General Style Options
Click the Format icon to open the Format pane. A few settings here shape the overall feel of the table before you touch any conditional formatting:
- Style presets, under Style, give you a quick starting point, such as alternating row colors or a minimal style with no gridlines, instead of building every visual detail from scratch.
- Grid settings let you turn gridlines on or off, adjust row height, and control the border around the table.
- Column headers let you change the header background, font, and alignment, separately from the data cells beneath them.
- Total row adds a summary row at the bottom of the table, showing a sum, average, or other aggregation for each numeric column.
Conditional Formatting: The Feature Worth Knowing Well
Conditional formatting is what turns a plain table into something that highlights its own story. Right click any column header, or use the fx button next to a field in the Format pane, and choose Conditional formatting. From there, Power BI offers a few distinct ways to apply it:
- Color scale, a gradient across the range of values in a column, lowest values getting one color and highest getting another, with everything in between blended proportionally. This is the fastest way to turn a column of numbers into a heat map style view.
- Rules, where you set specific thresholds yourself, such as values below 60 shown in red and values above 80 shown in green. This gives you more direct control than a color scale when you are comparing against a known target.
- Field value, which uses a separate field, often a DAX measure, to decide the color or icon for each cell. This is the most flexible option, since the logic behind the formatting can be as simple or as complex as the measure driving it.
- Data bars, which fill each cell with a horizontal bar sized to its value relative to the rest of the column, letting you compare magnitude at a glance without reading every number.
- Icons, which place a small symbol, such as an arrow or a colored circle, next to a cell’s value based on rules or a field, useful for status columns where people are scanning for what needs attention.
A Worked Example: Coloring a Column by Value
To apply a color scale to a Profit column, for instance, click the down arrow next to Profit in the visual’s field well, select Conditional formatting, then Background color. In the dialog that opens, choose Color Scale as the format style, then pick a minimum and maximum color. Power BI applies the gradient automatically across every value in that column, and updates it live if the underlying data changes.
Choosing the Right Formatting for the Job
- Use a color scale when you want a general sense of high versus low across a column, such as spotting your best and worst performing regions at a glance.
- Use rules when you are comparing values against a specific, known threshold, such as a target or a pass or fail cutoff.
- Use field value formatting when the logic is more complex than a simple threshold, such as a status that depends on more than one column.
- Use data bars when the relative size of values matters more than their exact color coded status.
- Use icons for status style columns that people will scan quickly across many rows, such as a report with fifty or more line items.
Common Mistakes to Avoid
- Formatting every column. Conditional formatting works because it draws the eye to what matters. Apply it to one or two key columns, not the whole table, or nothing stands out anymore.
- Trying to apply data bars to a non numeric column. Data bars and color scales both require a numeric field. If the option is missing for a column, check whether that field is actually a measure or a plain text or category field.
- Mixing too many colors across different columns. Keep your color choices consistent with the rest of the report, or the table starts to look like a patchwork rather than a coherent view.
- Forgetting the totals row. For any table with numeric columns that should sum or average meaningfully, turning on the totals row saves the reader from adding the column up themselves.
That covers building and formatting a table in Power BI, from style presets through conditional formatting. To keep building out your report, explore Prwatech’s Power BI training program, which includes placement assistance.