Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
rosswinter09
New Member

Expand column with functions in each row

I have a query from an OData feed. It returns two columns (an index) and another column that contains data with a type: function.

rosswinter09_0-1619095002285.png

Each of these functions contains a table (with 5 columns and which may contain multiple rows).

rosswinter09_1-1619095147293.png

I need to be able to return the contents of these functions, and the corresponding index.

For example, if the row with index 10 has a function that contains 3 rows, it should return 3 rows all with the same index and the corresponding columns (id,name,osBuild, productsNames,url)

10, id, name, osBuild, productsNames,url

10, id, name, osBuild, productsNames,url

10, id, name, osBuild, productsNames,url

 

Thanks

4 REPLIES 4
jennratten
Super User
Super User

It looks like the function does not require any inputs, so if you are just trying to invoke the function for reach row of the table, please try something like the script below.  Add this line right after #"Removed Columns 1", replacing the rest of the steps. This should result in a new column being added to the table, the contents of which is a table on each row.  

FnResult = Table.AddColumn ( #"Removed Columns 1", "FnResult", each [GetMissingKbs]() )

 

Exactly the same issue! Did you manage to resolve? 

rosswinter09
New Member

Just to add, I can expand the function for a single item, but I need to be able to do this for all items.

For example, if I extract a single row:

rosswinter09_0-1619099734071.png

This extracts the correct data

rosswinter09_1-1619099915616.png

How do I do this for all rows?

 

Hi @rosswinter09 ,

As far as I know, function type needs specific parameters to get the query result so it would not return multiple results at the same time.

About expanding columns in power query, you can refer this article:

Work with a List, Record, or Table structured column (Power Query) 

 

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors