Skip to main content
Microsoft Idea

Power BI

New

Allow users to set Power Query Editor tab size (indent) formatting

Vote (1) Share
Alex Gorbunov's profile image

Alex Gorbunov on 14 Dec 2023 02:27:01

I noticed that the Power Query Online Editor doesn't apply consistent indent (tab size).

For some reason the code that was copied from desktop has TabSize=4, but if the power query is created in Online Editor then it uses TabSize=2.


There are a few editor settings in Visual Studio:

"Editor: Tab Size", "Editor: Insert Spaces", "Editor: Detect Indentation", "Editor: Indent size".


"Editor: Indent size" is overridden based on the file contents when "Editor: Detect Indentation" is on.

So this problem can be solved by switching off the settings:

Editor: Detect Indentation (controls whether "Editor: Tab Size" and "Editor: Insert Spaces" will be automatically detected when a file is opened based on the file contents.


But unfortunately, the formatting settings are not available in Power Query Online Editor at the moment.

It would be great to have some basic editor formatting settings to make the code look consistent across all dataflows.