let#(lf) Initial = _TimelineWithParent,#(lf) #""Add initial pidx"" That is a heavily escaped string that now only looks right in the formula bar.Formula bar and Advanced Editor should always agree..." />
Skip to main content

Power BI

New

Editing a formula in the formula bar should preserve newlines, not replace with #(lf)

Vote (2) Share
John Doggett's profile image

John Doggett on 21 Nov 2018 09:13:14

Using the Power Query formula bar to edit something like this:

= (_TimelineWithParent as any) => let
Initial = _TimelineWithParent,
#"Add initial pidx" = Table.DuplicateColumn(Initial, "parentIndex", "pidx"),


Might result in:

let
Source = #!"(_TimelineWithParent as any) => let#(lf) Initial = _TimelineWithParent,#(lf) #""Add initial pidx""

That is a heavily escaped string that now only looks right in the formula bar.

Formula bar and Advanced Editor should always agree...

Comments (2)
John Doggett's profile image Profile Picture

ce6e0a94 865a-403a-9fda-b274ea8db63e on 05 Jul 2020 23:35:37

RE: Editing a formula in the formula bar should preserve newlines, not replace with #(lf)

This seems to happen with formulas that are syntactically incomplete (e.g. extra comma, etc). If the syntax is correct the newlines get restored.

John Doggett's profile image Profile Picture

ce6e0a94 865a-403a-9fda-b274ea8db63e on 05 Jul 2020 23:35:37

RE: Editing a formula in the formula bar should preserve newlines, not replace with #(lf)

Also happens a lot if you try to shift-click the entire contents of a multi-argument function call (text between the parents)