Skip to main content

Power BI

Needs Votes

expand power query nested formula to steps

Vote (2) Share
drigloff mefistoguru's profile image

drigloff mefistoguru on 30 Apr 2017 05:14:20

In the process of writing a solution, queries with many steps are often obtained. It would be very convenient to get a tool that allows you to merge selected linked steps into one by obtaining an embedded formula.
On the other hand, when you need to debug a code that uses nested formulas, it takes a long time to convert such formulas into separate steps. To do this, it would be very useful to use the tool for reverse decomposing embedded formulas into steps.

Comments (1)
drigloff mefistoguru's profile image Profile Picture

drigloff mefistoguru on 05 Jul 2020 22:47:28

RE: expand power query nested formula to steps

If We want to debug something code like below, we decompose this formula to steps.
//FROM THIS
Port = Lines.FromBinary(
Table.SelectRows(
Folder.Files("C:\Users\"&
CurrentUser&
"\AppData\Local\Microsoft\Power BI Desktop\AnalysisServicesWorkspaces"),
each ([Name] = "msmdsrv.port.txt"))[Content]{0},null,null,1200){0}

//TO THAT
Step1 = Folder.Files("C:\Users\"&
CurrentUser&
"\AppData\Local\Microsoft\Power BI Desktop\AnalysisServicesWorkspaces"),
Step2 = Table.SelectRows(Step1, each ([Name] = "msmdsrv.port.txt"),
Step3 = Lines.FromBinary(Step2[Content]{0},null,null,1200){0}