Idea: Add code folding functionality to DAX editor with collapsible code blocks and indentation levels
Feature Description:
I would like to propose adding code folding functionality to the DAX code editor in Power BI Desktop. Currently, while we have line numbering and code formatting with proper indentation, we lack the ability to collapse/expand code sections.
Proposed Enhancement: Add collapsible code blocks similar to other modern code editors (Visual Studio, VS Code, etc.) that would allow users to:
- Fold indented code blocks - Collapse nested calculations, SWITCH statements, complex IF conditions, TABs indent
- Fold custom sections - Allow manual folding of selected code ranges
- Visual indicators - Small arrow/plus icons next to foldable lines
- Preserve folding state - Remember collapsed sections when reopening measures/calculated columns
- Fold/Unfold shortcut - Include keyboard shortcuts for expand/collapse all
Benefits:
- Improved readability - Focus on specific parts of complex DAX code
- Better navigation - Quickly jump between different sections of large formulas
- Reduced cognitive load - Prevent code from obscuring the report canvas
- Enhanced productivity - Especially valuable for complex measures with multiple variables and nested logic
Example Scenario: When working with a measure containing 40/50+ lines of DAX with multiple variables, nested conditions, and error handling, being able to collapse sections would significantly improve the editing experience, especially where zooming outreduces readability. This feature would align Power BI's DAX editor with modern development environment standards and greatly enhance the developer experience for complex DAX development.
Recent ideas
Data Pipelines - Run only selected activities
For debugging and testing pipeline activities during development, allow us to select one or multiple activities and run only the selected pipeline activities. For example, I'm working on editing ...frithjof_v9 hours agoCommunity ChampionNew613Views11likes2CommentsSemantic model connection bindings should be in source control (Git)
Semantic model data source connection bindings should be source controlled. A semantic model can contain multiple data source references, each of which can be mapped to a separate Fabric data connec...frithjof_v17 hours agoCommunity ChampionNew17Views1like0CommentsBulk changing column names in Visualizations Pane
We often use raw/api column names or measures with a set nomenclature to be consistent and to keep track of them but we do not want to display these names in the visuals. Currently we have to change ...vishal14019720 hours agoFrequent VisitorNew6Views0likes0Comments