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
Semantic 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_v46 minutes agoCommunity ChampionNew10Views1like0CommentsBulk 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 ...vishal1401974 hours agoFrequent VisitorNew5Views0likes0CommentsAbout "Download SQL database project" and fix the downloaded project
1. The sqlproj must be fixed, it is downloaded without the xml markup line <?xml version="1.0" encoding="utf-8"> 2. The sdk must be updated: Actual: <Sdk Name="Microsoft.Build.Sql" Version="0.1...Jarrinf14 hours agoFrequent VisitorNew48Views3likes2Comments