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
F5 for presentation mode in POWER BI DESKTOP
F5 for presentation mode in POWER BI DESKTOP. In design time when we press F5 . 1) The canvas goes to fit to screen mode. 2) Visual headers will be hidden for visual components which set to hidden in...ndaneshi1 hour agoNew MemberNeeds Votes103Views3likes2CommentsExpose Card Visual Reference Values to DAX via SELECTEDREFERENCEVALUE() or similar
Description The new Card visual introduces Reference Values and Reference Labels, which are excellent for displaying targets, benchmarks, prior periods, and other contextual metrics alongside a KPI....SEMattis2 hours agoAdvocate IIINew2Views0likes0Comments