You build a dynamic table in Power BI by creating a table visual, adding a measure that uses functions like SELECTEDVALUE, and then letting slicers or filters change what the table shows. The direct answer: put your fields in a Table visual, add slicers for the columns you want to switch, and write DAX measures that respond to those slicers. This guide walks through the process from start to finish, including common pitfalls and how to fix them.

What You'll Need

  • Power BI Desktop installed (the steps below use the current version; menu labels can differ slightly by version or region).
  • A dataset loaded into your report (Excel, CSV, or a database connection).
  • Basic familiarity with the Fields pane and the Visualizations pane.
  • Optional: a slicer or two if you want the table to change based on user selection.

Step-by-Step

  1. Load your data. Open Power BI Desktop, go to Home > Get data, choose your source, and load the table you want to display. Make sure the column headers are correct and data types are set (Text, Whole Number, Date, etc.) in the Data view.
  2. Create a basic table visual. In the Report view, click the Table icon in the Visualizations pane. Drag the fields you want to show from the Fields pane into the Values well. The table appears on the canvas.
  3. Add a slicer for dynamic filtering. Click the Slicer icon in the Visualizations pane, then drag a field (for example, Region or Category) into the Field well. The slicer lets users filter the table interactively.
  4. Write a measure that responds to slicers. Go to Modeling > New measure. Use a formula like: Selected Region Sales = CALCULATE(SUM(Sales[Amount]), ALLSELECTED(Sales[Region])). This measure recalculates based on the slicer selection. Add it to the table by dragging it into the Values well.
  5. Use SELECTEDVALUE for dynamic labels. Create a measure like: Region Label = SELECTEDVALUE(Sales[Region], "All Regions"). Put this in a Card visual or as a title to show what the table is currently filtered to.
  6. Enable column switching with a parameter table. Create a new table (Home > Enter Data) with two columns: one for the display name (e.g., "Sales", "Profit") and one for the field reference. Use Modeling > New parameter > Fields to generate a parameter, then use a measure with SWITCH to return the selected field. Add the parameter to a slicer so users can switch columns in the table.
  7. Format the table. Select the table visual, go to the Format pane (paintbrush icon), and adjust column headers, gridlines, and font sizes. Use conditional formatting (Format > Cell elements) to add data bars or color scales.
  8. Test interactivity. Click different slicer values and confirm the table updates. Use Ctrl+click to multi-select if needed. Check that measures recalculate correctly.
  9. Publish to the Power BI service. Go to File > Publish > Publish to Power BI. Choose a workspace. In the service, the table remains interactive for viewers with permission.

Common Mistakes

  • Using a calculated column instead of a measure. Calculated columns are static at refresh; measures recalculate with slicers. For dynamic behavior, use measures.
  • Forgetting ALLSELECTED. Without it, slicer selections may not affect the measure as expected.
  • Adding too many fields to the Values well. This can slow performance and clutter the table. Keep it focused.
  • Not setting data types. Text numbers won't aggregate correctly. Fix types in the Data view.
  • Ignoring relationships. If your tables aren't related in Model view, slicers won't filter correctly. Check the lines between tables.

Tips

  • Use a dedicated parameter table for column switching rather than hardcoding field names.
  • Name measures clearly (e.g., "Sales Dynamic") so you can find them later.
  • Use the Performance Analyzer (View > Performance Analyzer) to check if your table loads slowly.
  • Keep slicers above the table for intuitive layout.
  • Use bookmarks to save different table states if you need preset views.

Troubleshooting

If the table does not update when you click a slicer, first check that the slicer field is related to the table fields in Model view. Next, verify the measure uses CALCULATE with ALLSELECTED or ALL. If the table shows blank values, check for missing relationships or incorrect data types. If performance is slow, reduce the number of visuals on the page and use the Performance Analyzer to identify bottlenecks. If the parameter slicer doesn't switch columns, ensure the SWITCH measure references the parameter table correctly and that the parameter is set to the right data type. For publishing issues, confirm you have permission to the workspace and that the dataset refresh is scheduled if using an on-premises source.

Frequently Asked Questions

Can I make a table dynamic without DAX?

Yes, partially. You can use slicers and filters to change what rows appear, but switching columns or changing labels dynamically requires DAX measures.

What is the difference between a calculated column and a measure?

A calculated column is computed row-by-row at refresh and stored in the model. A measure is computed at query time based on the current filter context, so it responds to slicers.

Why does my SELECTEDVALUE return blank?

SELECTEDVALUE returns blank when multiple values are selected and no alternate result is provided. Add a second argument like "Multiple" to handle that case.

Can I use a dynamic table in Power BI Service?

Yes, once published, the table and slicers remain interactive for viewers. Editing the DAX requires Power BI Desktop.

How do I switch between columns in a table?

Create a parameter table with field names, then use a SWITCH measure that references the selected parameter value. Add the parameter to a slicer.

Does a dynamic table work on mobile?

The Power BI mobile app displays tables and slicers, but layout may differ. Test in the mobile view (View > Mobile layout) before publishing.