SOLVED

How do I only expand the first row of a table?

%3CLINGO-SUB%20id%3D%22lingo-sub-2548898%22%20slang%3D%22en-US%22%3EHow%20do%20I%20only%20expand%20the%20first%20row%20of%20a%20table%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2548898%22%20slang%3D%22en-US%22%3E%3CP%3EHi!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20only%20want%20to%20return%20the%20first%20result%20from%20each%20table%20from%20each%20row.%20How%20do%20I%20do%20this%3F%20Some%20tables%20only%20have%201%20item%2C%20others%20have%204%20or%20more%2C%20the%20first%20is%20always%20the%20one%20I%20want.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%221.png%22%20style%3D%22width%3A%20407px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F295891i0DACD2BF222E86E6%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%221.png%22%20alt%3D%221.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EFormula%20after%20I%20expand%20the%20tables%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPicture%20to%20match%20formula%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F295893iDA7DB4895D48E926%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222.png%22%20alt%3D%222.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-basic%22%3E%3CCODE%3E%3D%20Table.ExpandTableColumn(%23%22Expanded%20Device%22%2C%20%22NetworkInterface%22%2C%20%7B%22sNetworkAddress%22%2C%20%22sNetworkName%22%7D)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3BThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2548898%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPower%20BI%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2549058%22%20slang%3D%22de-DE%22%3ESubject%3A%20How%20do%20I%20only%20expand%20the%20first%20row%20of%20a%20table%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2549058%22%20slang%3D%22de-DE%22%3E%3CP%3EYou%20can%20add%20a%20custom%20column%20with%20the%20formula%20%3CBR%20%2F%3E%20Table.First(%5BNetworkinterface%5D)%20%3CBR%20%2F%3E%20Expand%20this%20new%20column.%3CBR%20%2F%3EOr%20you%20can%20integrate%20Table.First()%20in%20you%20a.m.%20formula.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi!

 

I only want to return the first result from each table from each row. How do I do this? Some tables only have 1 item, others have 4 or more, the first is always the one I want.

1.png

Formula after I expand the tables:

 

= Table.ExpandTableColumn(#"Expanded Device", "NetworkInterface", {"sNetworkAddress", "sNetworkName"}, {"sNetworkAddress", "sNetworkName"})

 

Picture to match formula:

2.png

Thanks!

1 Reply
best response confirmed by dlprentice (Occasional Contributor)
Solution

You can add a custom column with the formula
Table.First([Networkinterface])
Expand this new column.
Or you can integrate Table.First() in you a.m. formula.