Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi have a code that gives me following table-
1. Code - Just Amended the source for Pic, Ignore the error
Table
The thing is I do not want it as table but as a blank list as follows:
3 - The requirement
So I add 1 more step to my query in Pic 1 as follows and everything works:
4. Added Code highlighted in step 1(added code in line 3)
I am getting what I want and happy but I have no idea what the added code is doing and no idea what am I doing. Can someone please temm me what the third line of my code is doing Column1 = #"Term1End2021_DefinedName"{0}[Column1]
Your explanation will be highly appreciated.
Thank you
Solved! Go to Solution.
in your second step of #"Term1End2021_DefinedName", you get a table.
#"Term1End2021_DefinedName"{0} get the first row of the table, it's a record
#"Term1End2021_DefinedName"{0}[Column1] get the field of Column1 of the record
The first code returns type table--a table value that contains the value 44288 in [Column1]{0} which is Column1, first zero index row.
Your second code reaches into the field of the table with the [Column]{RowNumber} syntax placed after the table reference (by the way, {0}[Column] = [Column]{0}, but performance can differ.
You can also just right click on a value in a table, and click Drill Down to get just the value itself.
One more thing that I find useful to remember: any function that returns a table can make use of this syntax. For example:
=Table.SelectRows(TableName, each [Date] >= SomeDateValue)
returns a table, and so you can easily add a field reference:
= Table.SelectRows(TableName, each [Date] >= SomeDateValue){0}[Sales]
By the way, you could probably save yourself a step and add the {0}[Column1] right after [Data] at the end of your last step, before the comma.
--Nate
The first code returns type table--a table value that contains the value 44288 in [Column1]{0} which is Column1, first zero index row.
Your second code reaches into the field of the table with the [Column]{RowNumber} syntax placed after the table reference (by the way, {0}[Column] = [Column]{0}, but performance can differ.
You can also just right click on a value in a table, and click Drill Down to get just the value itself.
One more thing that I find useful to remember: any function that returns a table can make use of this syntax. For example:
=Table.SelectRows(TableName, each [Date] >= SomeDateValue)
returns a table, and so you can easily add a field reference:
= Table.SelectRows(TableName, each [Date] >= SomeDateValue){0}[Sales]
By the way, you could probably save yourself a step and add the {0}[Column1] right after [Data] at the end of your last step, before the comma.
--Nate
in your second step of #"Term1End2021_DefinedName", you get a table.
#"Term1End2021_DefinedName"{0} get the first row of the table, it's a record
#"Term1End2021_DefinedName"{0}[Column1] get the field of Column1 of the record
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.