Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Apologies in advance for the cryptic forum title.
I am studying Power BI at the moment, and was going through this following article on Power Query M Code
In the example code given it states the following (very roughly)
let
Source = Web.Page(.......),
Data0 = Source{0}[Data],
#"Changed Type" = Table........
#"Changed Type1" = Table........
in
#"Changed Type1"
I was looking at the example provided of the code in the "Advanced Editor" and I cant quite piece together what line 3 is doing in the code.
Specifically the line that says
Data0 = Source{0}[Data]
If I understand correctly, Data0 is a new step which is equal to Source{0}[Data].
Source is referring to the previous step, and [Data] is a column.
So I am confused what is happening when its also got the extra {0} sandwiched in between?
I tried to search around, and the closest thing I could find was referring to {0} as possibly a "list", or a data value? But I think I am terribly off course here and was hoping for some guidance.
Thanks in advance
Solved! Go to Solution.
Thanks so much for this!
That article is exactly what I am looking for 🙂
So to summarize, this is used for Power Query M language "cell navigation"
Taken from the article: StepName{RowIndexNumber}[Column] and this specific RowIndexNumber is one that is automatically generated by Power Query. Power Query has its own index and it starts from 0, so if you’re trying to get the first row of a list or a table, you’d use {0}
I was able to do further reading, and syntax wise its acceptable to either use
StepName{RowIndexNumber}[Column] or StepName[Column]{RowIndexNumber}
These will both essentially produce the same result, but the difference is the sequence or order of steps. Either it can pull the record first, then the specific column OR it can just pull the column and then get the record.
Thanks for the clarification! Again much appreciated!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 68 | |
| 68 | |
| 33 | |
| 31 | |
| 31 |