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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Syndicate_Admin
Administrator
Administrator

Get Data from a Nested Table

Hello, 
within my data table I have several nested tables.
Using if conditions I want to check for different scenarios.
E.g. if [value_column] > [value_nestedtable1] then 1 else 0

I'm accessing the data within the nested table by using List.Max([nested_table][column_in_nestedtable]).
That works, however, it slows down my report significantly. 
The data within the nested tables are either numbers or dates.
Is there a better way to access the data within a nested table?


Thanks in advance,
Marco

3 REPLIES 3
watkinnc
Super User
Super User

Do your nested tables result from a join, group, or something else.  Of course, if it's from grouping, you can add the Max aggregate in your group step.

 

--Nate


I’m usually answering from my phone, which means the results are visualized only in my mind. You’ll need to use my answer to know that it works—but it will work!!
Syndicate_Admin
Administrator
Administrator

Thank you for the answer.
I think in that way I aggregate the nested table and only retrieve one value.
Actually, I want to keep the whole nested table as I need it for further calculations.
Then I have the same issue that getting data out of the nested tables slows down my report. 

watkinnc
Super User
Super User

You could instead use 

 

Table.AggregateTableColumn(table as table, column as text, aggregations as list) as table

and then do your comparison. So

 

= Table.AggregateTableColumn(TableOrPriorStepName, {{"ColumnInNestedTable", List.Max, "NewColumnName"}})


A lot of these table functions are very well optimized.

 

--Nate


I’m usually answering from my phone, which means the results are visualized only in my mind. You’ll need to use my answer to know that it works—but it will work!!

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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

Top Solution Authors
Top Kudoed Authors