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
Anonymous
Not applicable

Add rows containing a list of IDs for each categories

Hello to the community,

Currently, I'm stuck with this data transformation in power query editor :

I have one table named "seasonality" with all the dates of the years :

NIB123_0-1626946981551.png

 

I have a second table  named "Data Equipment" with several ID :

NIB123_1-1626947108203.png

 

And I want combine this tables with this transformation : for each dates, add all rows with this IDs  

Desired result 

NIB123_0-1626954431062.png

 


If someone can help me.. or offers me another solution of transformation, group by etc..

Thank you in advance !



1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

2 things:

1 - to get more detail on errors, click in the error box (not on the error) and you'll get a further details below the dataset.

2 - did you write that code yourself because there's a lot wrong with it.  I suggest deleting the step.

After that, click the 'custom column' on the Add Column menu.  In the formula box put the name of the other table (if you write # , intellisense should offer you the name). Click OK.

If that works, expand the column header to return the correct field.

View solution in original post

7 REPLIES 7
HotChilli
Super User
Super User

2 things:

1 - to get more detail on errors, click in the error box (not on the error) and you'll get a further details below the dataset.

2 - did you write that code yourself because there's a lot wrong with it.  I suggest deleting the step.

After that, click the 'custom column' on the Add Column menu.  In the formula box put the name of the other table (if you write # , intellisense should offer you the name). Click OK.

If that works, expand the column header to return the correct field.

Anonymous
Not applicable

Thanks a lot ! It's working ! 😁

I'm beginner with Power BI so I didn't know this trick..

HotChilli
Super User
Super User

I can help if you tell me what you've got so far.   Any errors?  

Here is my error

NIB123_0-1626964152619.png

 

Anonymous
Not applicable

Here is my error

NIB123_0-1626964152619.png

 

HotChilli
Super User
Super User

In seasonality, add custom column and just put the name of the 2nd table.  You can then expand the header.

 

If the 2nd table has many colmuns but you just want to add one then just put the Table[columnName] in the Add custom column code box.  You will then be able to expand the list to new rows

Anonymous
Not applicable

This solution not working or may be I didn't understand

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