Forum

Merge or lookup two...
 
Notifications
Clear all

Merge or lookup two nested tables

8 Posts
3 Users
0 Reactions
297 Views
(@leroynz)
Posts: 6
Active Member
Topic starter
 

Hi,

I have a table. Within the table some of the columns have nested tables within them.

Column "TableFFromlisttest" has a nested table in each row. In that nested table is one column called "Column1".

TableFFromlisttest-1.jpg

The data in column 1 of the nested table may vary in each row from ie contain any combinations of the three rows or only one of them

 

Column "levytable" also has a nested table in each row. In that nested table is two columns "Wording in Regs" & "Levy $"

levytable-1.jpg

 

Somehow I need to combine or lookup or transform so that Column "TableFFromlisttest" nested table contains an added column "$" that pulls data or looks up from the other nested table.

The result would be a nested table Column A in each row.

Result.jpg

Any help would be appreciated

 
Posted : 09/08/2022 8:54 pm
(@jstewart)
Posts: 216
Estimable Member
 

Phil gives a good way to do this in this video. If you need further assistance please upload an example file complete with an example of your desired result. It is helpful to manipulate the data to better understand your issue. Hope this helps.

 
Posted : 11/08/2022 11:17 am
(@leroynz)
Posts: 6
Active Member
Topic starter
 

Hi Jessica,

Thanks for your tips. I tried Phil's method. and it does pull data from a table based on cell containing a 'value'.

However I'm trying to add another column to the nested table in the 'TableFFromlisttest' column which finds the 'Levy $' which I then get the maximum and return as a result the "Wording in Regs"

I've included a PBI file. I can do it by another method but would like to achieve the:

want-to-achieve.jpg

 

I hope this makes it clearer

 

screen shots of the other bits

Data-Screenshot.jpg

Levies-screenshot.jpg

Levytable-column.jpg 

Table1Row2ColumnTableFFromlisttest.jpg

Table1Row2ColumnTableFFromlisttest-1.jpg

Result1.jpg

 
Posted : 19/08/2022 2:23 am
(@jstewart)
Posts: 216
Estimable Member
 

Unfortunately, I don't have Power BI so I can't see the data. Hopefully, someone else can help you out that can see the data. I'm sorry.

 
Posted : 19/08/2022 10:44 am
Riny van Eekelen
(@riny)
Posts: 1194
Member Moderator
 

Hi Leroy,

I took a look at the pbix file but found it difficult to figure out what you are trying to achieve. Decided to copy the data and queries into Excel and added a few steps to the query that combines the Data and Levies tables before loading it back to Excel. It may or may not be what you want. 

If not, can you add a table to the Excel file (by typing) showing us what the end result should be?

Riny

 
Posted : 20/08/2022 8:58 am
(@leroynz)
Posts: 6
Active Member
Topic starter
 

Hi Riny,

Thanks for the reply. I tried to simplify it for better understanding of what I'm after.

    which contains a nested list or [TableFFromlisttest] which contains a nested table can be used. Either is ok. Because Phil's video suggests using List.PostitionOf is a faster method & I have a lot of data I'm wanting to achieve the result by not using a merge process.

     

    List-from-row.jpg

    Single-column-table-from-row.jpg

    nested-levy-table.jpg

    Result I'm after is the nested table has an additional column[Levy $] which has the corresponding levy amount from some kind of a lookup

    Result-required.jpg

     

    I'm then able able to then get the record with the maximum levy amount and continue on with further steps.

     
Posted : 23/08/2022 5:37 pm
Riny van Eekelen
(@riny)
Posts: 1194
Member Moderator
 

Hi Leroy,

Perhaps I'm just slow today but I still don't get it. You mention that you want "a nested table with a conditional column for Levy $". Isn't that exactly what you already have, as shown in the Result-required picture?

 
Posted : 24/08/2022 12:51 am
(@leroynz)
Posts: 6
Active Member
Topic starter
 

Hi Riny,

Apologies for the late reply. You are correct in that I achieved the result. However I went to and watched the link Jessica mentioned and it seemed to imply that using List.PositionOf was a more efficient/quicker way than using some kind of merge. As I have a large amount of data the current method takes 2.5 hours to update. I was hoping to find another way and then I could test it to see if indeed it was more efficient.

Thanks for you input.

Regards

Leroy

 
Posted : 30/08/2022 5:16 pm
Share: