Power bi dynamic columns show hide without republishing
Direct Answer
Power BI does not natively support adding or hiding dimension columns based on a slicer in a published report. Three workarounds exist: (1) Field Parameters — a native Power BI feature that lets users toggle measures on/off via a slicer; (2) DAX measure switching — returning BLANK() for columns the user hasn't selected; (3) Custom visuals like Flexa Tables that provide true drag-and-drop column control in the published report without any DAX.
Why Dynamic Columns Don't Work Natively in Power BI
Power BI's table and matrix visuals have a fixed column structure set at report design time. Once a report is published to Power BI Service, end-users can filter rows, sort, and drill down — but they cannot add, remove, or reorder columns without the developer opening Desktop and republishing.
⚠ Important distinction: Dynamic columns work differently for measures vs dimensions. The workarounds below are most effective for toggling measures (Sales, Margin, Units). Hiding dimension columns (Customer Name, Region, Product) requires a different approach — unpivot + Matrix, or a custom visual.
This is one of the most requested features on the Power BI Ideas forum and one of the most frequently asked questions on Fabric Community. Here are the three practical solutions available today.
Method 1: Field Parameters (Best Native Option)
Field Parameters are a native Power BI feature (available since 2022) that lets users select which measures appear as columns in a table or chart. A slicer controls the selection — users tick the measures they want to see.
How to set up Field Parameters:
- In Power BI Desktop, go to Modeling tab → New Parameter → Fields
- Select the measures you want users to toggle (e.g. Sales, Margin, Units, Headcount)
- Check "Add slicer to this page" — Power BI auto-creates the parameter table and slicer
- Add the Parameter field (not the individual measures) to your table visual's Values bucket
- Publish — end-users can now tick/untick measures in the slicer to control which columns appear
-- Power BI auto-generates this DAX for Field Parameters
-- (you don't write this manually — it appears after setup)
Metrics Parameter = {
("Sales", NAMEOF('Sales'[Total Sales]), 0),
("Margin", NAMEOF('Sales'[Gross Margin]), 1),
("Units", NAMEOF('Sales'[Units Sold]), 2),
("Headcount",NAMEOF('HR'[Headcount]), 3)
}Field Parameters only work with measures — not with dimension columns like Customer Name or Product. For dimension toggling, see Method 3.
Limitations of Field Parameters:
- Measures only — dimensions cannot be toggled this way
- Column order follows the slicer selection order, not a fixed sequence — can look inconsistent if users select in different orders
- Requires Desktop to add new measures to the parameter — still a developer task when new KPIs are added
Method 2: DAX Measure Switching (Flexible but Complex)
Before Field Parameters existed, the standard approach was a what-if parameter combined with DAX measures that return BLANK() for unselected columns. This approach still works and is sometimes more flexible for complex logic.
Step 1 — Create a disconnected selection table in Power Query:
-- Disconnected table (no relationship to any fact table)
-- Create via Enter Data in Power BI Desktop
ColumnSelector =
DATATABLE(
"ColumnName", STRING,
"SortOrder", INTEGER,
{
{"Sales", 1},
{"Margin", 2},
{"Units", 3},
{"Headcount", 4}
}
)Step 2 — DAX measure that returns value only when column is selected:
Dynamic Column =
VAR _selected = SELECTEDVALUE('ColumnSelector'[ColumnName])
RETURN
SWITCH(
_selected,
"Sales", [Total Sales],
"Margin", [Gross Margin],
"Units", [Units Sold],
"Headcount", [Headcount],
BLANK() -- returns blank if nothing selected
)Place this measure in the Matrix visual's Values, with ColumnSelector[ColumnName] in Columns. Add a slicer from ColumnSelector[ColumnName] for user selection.
⚠ This approach has one major downside: every time Finance requests a new metric, you need to update both the disconnected table AND the SWITCH measure — two places to maintain instead of one.
Method 3: Custom Visual for True Dynamic Columns
Both methods above have the same ceiling: they require developer involvement when new columns need to be added, and neither handles dimension columns (not just measures). For teams that need end-users to truly control their own column layout — adding, removing, and reordering any field including dimensions — a custom visual is the only practical solution.
Flexa Tables (Microsoft AppSource) handles this natively in the published report:
- Drag-and-drop columns — users rearrange, add, and remove any field directly in Power BI Service
- Works for both measures and dimensions — not limited to numeric columns
- No DAX required — new columns from the data model are available to add without any measure creation
- Built-in variance columns — DoD, MoM, YoY appear as toggle options alongside regular columns
Installs from AppSource in under 5 minutes, works with the existing data model. See the full feature overview at Power BI Pivot Table: Add Excel-Style Pivoting Without DAX.
Comparison: Which Method to Use
| Requirement | Field Parameters | DAX Switch | Flexa Tables |
|---|---|---|---|
| Toggle measure columns via slicer | ✓ | ✓ | ✓ |
| Toggle dimension columns (Customer, Region) | ✕ | ⚠ Complex | ✓ |
| Reorder columns in published report | ✕ | ✕ | ✓ |
| New KPI added without DAX update | ✕ | ✕ | ✓ |
| Built-in variance columns (MoM, YoY) | ✕ | ✕ | ✓ |
| Requires DAX to set up | No | Yes | No |
| Works in DirectQuery mode | ✓ | ⚠ Depends | ✓ |
Give Users True Column Control in Power BI Service
Flexa Tables installs from AppSource in under 5 minutes. Free trial, no credit card required.
Get Free Trial on AppSource →Frequently Asked Questions
Can I add or remove columns dynamically in Power BI without republishing?
For measure columns, yes — use Field Parameters (Modeling tab → New Parameter → Fields) to let users toggle measures via a slicer in Power BI Service. For dimension columns (Customer Name, Region, Product), native Power BI does not support this. Use a custom visual like Flexa Tables for true drag-and-drop column control in the published report.
What are Field Parameters in Power BI?
Field Parameters are a native Power BI feature that creates a parameter table containing a set of measures. When added to a table or chart visual, combined with a slicer, end-users can select which measures appear as columns without developer involvement. Find it under Modeling tab → New Parameter → Fields in Power BI Desktop. Introduced in 2022, available in all current versions.
Why can't I show or hide columns in Power BI using a slicer?
Power BI's table and matrix visuals have a fixed column structure defined at design time. Slicers filter rows, not columns — this is a core architectural constraint of the native visuals. The workarounds are Field Parameters (for measures), DAX measure switching (for measures with more control), or custom visuals like Flexa Tables (for both measures and dimensions).
How do I let users choose which columns to display in Power BI?
Use Field Parameters for the simplest setup: Modeling → New Parameter → Fields → select your measures → check "Add slicer to this page." Place the parameter field in your visual's Values bucket. Users can then check/uncheck columns in the slicer. For dimension columns or more flexible layouts, see Flexa Tables on AppSource.
Can I reorder columns in Power BI after publishing?
Not with native Power BI — column order is set at design time and requires Desktop + republish to change. Field Parameters do not support user-controlled column ordering. Custom visuals like Flexa Tables allow drag-and-drop column reordering directly in Power BI Service after publishing.
Related Reading
→ Power BI Pivot Table: Add Excel-Style Pivoting Without DAX
→ Power BI Matrix vs Table: When to Use Each
→ Variance Analysis in Power BI Without DAX
→ Power BI Rows to Columns: UNPIVOT and Cross-Tab Reports
Flexa Intel Team
Power BI Custom Visuals · flexaintel.com
We build Microsoft-certified Power BI visuals that close the gap between what Power BI does natively and what analysts and finance teams actually need. Flexa Tables is available on Microsoft AppSource.
