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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
psmalley-ati
New Member

Select single value in nested table for a new column

I have a nested table that I expanded using the table.expandtablecolumn. One of the columns that I expanded also has a nested table of its own that can have multiple rows. 

 

This nested table with multiple rows has a column called is_latest_user_for_fct which only has one row with "TRUE". 
For that one row with "TRUE" under the column is_latest_user_for_fct I would like to extract the value under "last_seen"

psmalleyati_1-1673977116904.png

 

How would I go about this?

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @psmalley-ati 

 

Assume your data is like below, the nested table column is called "Values".

vjingzhang_0-1674010788494.png

You can add a custom column with below code

Table.SelectRows([Values], each [is_last_user_for_fct] = true)[last_seen]{0}

vjingzhang_1-1674017444873.png

Result:

vjingzhang_0-1674016854014.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @psmalley-ati 

 

Assume your data is like below, the nested table column is called "Values".

vjingzhang_0-1674010788494.png

You can add a custom column with below code

Table.SelectRows([Values], each [is_last_user_for_fct] = true)[last_seen]{0}

vjingzhang_1-1674017444873.png

Result:

vjingzhang_0-1674016854014.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

jbwtp
Memorable Member
Memorable Member

Hi @psmalley-ati,

 

You can, of course, use filter and fetch the data from the second nested table (for example, using Table.AddColumn to fetch the value). This may look cooler, however, almost certainly, the code will be quicker if you just expand the nested table (with is_latest_user_for_fct and last_seen columns) and then filter the output table for the desired result.

 

Cheers,

John

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

Top Solution Authors