Power BI
Needs VotesApply consistent indentation for multi-line formulas for viewing in advanced editor
John Doggett on 21 Nov 2018 07:27:28
In the Power Query Editor, it is possible to enter a multi-line formula in the formula bar. For example:
= () => let
Source = SampleIndexedTimeline,
fxFormPath = (_) => if _[parentIndex] <> null then
Number.ToText(_[parentIndex]) & "/" & _[idPath]
else
_[idPath]
When this is examined in the Advanced Editor, it does not indent any line but the first in any sensible way:
let
Source = SampleIndexedTimeline,
fxFormPath = (_) => if _[parentIndex] <> null then
Number.ToText(_[parentIndex]) & "/" & _[idPath]
else
_[idPath],
#"Extract parentIndex" = Table.ExpandTableColumn(Source, "parentRow", {"index"}, {"parentIndex"}),
Every other line is fully indented (and prefixed with the step assignment), but lines 2+ in multiline formulas are not indented.