Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I can insert a blank row using this code:
= Table.InsertRows(Source, 0,{Record.FromList(List.Repeat({""},Table.ColumnCount(Source)),Table.ColumnNames(Source))})
but the zero inserts at the beginnng of the table.
I would like to insert the blank row at the last row.
I tried using Table.PositionOf(Source, RowAsRecord) but do not know how to extract the RowAsRecord.
Table.LastN(Source, 1) // locates the row, but is not a record type.
Finally I tried converting it to a record, but is not in the format [name="", value=""]
Record.FromTable(Table.LastN(Source, 1))
Hence, this code does not work:
= Table.InsertRows(Source,
Table.PositionOf(Source,
Record.FromTable(Table.LastN(Source, 1))),
{Record.FromList(List.Repeat({""},Table.ColumnCount(Source)),Table.ColumnNames(Source))})
Please advise. Thank you!
Solved! Go to Solution.
Replace the "0" with Table.RowCount(Source). This will give you the row count, which is one more than the zero based index of the last row.
--Nate
Thank you @Anonymous that was easy!
Replace the "0" with Table.RowCount(Source). This will give you the row count, which is one more than the zero based index of the last row.
--Nate
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
15 | |
15 | |
13 | |
12 | |
11 |