Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I only want to return the first result from each table from each row. How do I do this? Some tables only ahve 1 item, others have 4 or more, the first is always the one I want.
Formula after I expand the tables:
= Table.ExpandTableColumn(#"Expanded Device", "NetworkInterface", {"sNetworkAddress", "sNetworkName"}, {"sNetworkAddress", "sNetworkName"})
Picture to match formula:
Thanks!
Solved! Go to Solution.
You can try with step below
= Table.ExpandTableColumn( Table.TransformColumns(#"Expanded Device",{ "NetworkInterface", each Table.FirstN(_,1)}) , "NetworkInterface", {"sNetworkAddress", "sNetworkName"}, {"sNetworkAddress", "sNetworkName"})
Even cleaner:
= Table.TransformColumns(#"Table or Last Step Name", {{"NetworkInterface", each Table.FirstValue(_)}})
--Nate
If you are saying you want the first value from the first cow of each table, it's Table.AddColumn(#"Name of Your Last Step or Table Name", "First", each Table.FirstValue([NetworkInterface]))
--Nate
You can try with step below
= Table.ExpandTableColumn( Table.TransformColumns(#"Expanded Device",{ "NetworkInterface", each Table.FirstN(_,1)}) , "NetworkInterface", {"sNetworkAddress", "sNetworkName"}, {"sNetworkAddress", "sNetworkName"})
Great solution, just what I needed!
How would you sort this in decending order BEFORE getting the first row? Turns out the data needs to be sorted first to get the expected first item.
= Table.ExpandTableColumn( Table.TransformColumns(#"Expanded Device",{ "NetworkInterface", each Table.FirstN (Table.Sort(_,{{"sNetworkName", Order.Descending}}) ,1)}) , "NetworkInterface", {"sNetworkAddress", "sNetworkName"}, {"sNetworkAddress", "sNetworkName"})
You can add a custom column with this formula to keep just the top record (row) of your tables.
= Table.FirstN([NetworkInterface],1)
or
= [NetworkInterface]{0}
You can then delete the original column and expand the new one.
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 10 | |
| 6 | |
| 5 | |
| 4 | |
| 2 |