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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
joannerw
Helper I
Helper I

Consolidate data from multiple columns

Below is an example of a dataset that I need to consolidate to be able to report on each weed type, each chemical type and the total and average of the concentrate. How do I consolidate this data? There is more data on each line, but this is the data that is entered more than once

 

joannerw_0-1666827861802.png

 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @joannerw 

 

You can try the following methods. In Power Query, copy the tables into 3 copies, leaving only 3 columns for each table.

Table1 and Table2:

vzhangti_0-1667268032556.pngvzhangti_1-1667268048410.pngSelect the Weed 1 column, Chemical 1 column and Concentration 1 column in Table 1 and click Unpivot Column. The result is shown in the figure.

vzhangti_6-1667268437047.png

Other tables are also set up like this.

vzhangti_7-1667268517296.png

Then use the Append function to add several tables to one table.

vzhangti_5-1667268325615.png

Result:

vzhangti_8-1667268578115.png

Let's go back to Desktop. Modify the column name.

From:

vzhangti_9-1667268733161.png

To:

vzhangti_10-1667268824315.png

Finally, a new table is created.

Chemical = SUMMARIZE(Append1,Append1[Chemical],Append1[Value.2])

vzhangti_11-1667269090912.png

Weed = SUMMARIZE(Append1,Append1[Weed],Append1[Value.1])

vzhangti_12-1667269114907.png

Is this the result you expect?

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

 

View solution in original post

3 REPLIES 3
v-zhangti
Community Support
Community Support

Hi, @joannerw 

 

You can try the following methods. In Power Query, copy the tables into 3 copies, leaving only 3 columns for each table.

Table1 and Table2:

vzhangti_0-1667268032556.pngvzhangti_1-1667268048410.pngSelect the Weed 1 column, Chemical 1 column and Concentration 1 column in Table 1 and click Unpivot Column. The result is shown in the figure.

vzhangti_6-1667268437047.png

Other tables are also set up like this.

vzhangti_7-1667268517296.png

Then use the Append function to add several tables to one table.

vzhangti_5-1667268325615.png

Result:

vzhangti_8-1667268578115.png

Let's go back to Desktop. Modify the column name.

From:

vzhangti_9-1667268733161.png

To:

vzhangti_10-1667268824315.png

Finally, a new table is created.

Chemical = SUMMARIZE(Append1,Append1[Chemical],Append1[Value.2])

vzhangti_11-1667269090912.png

Weed = SUMMARIZE(Append1,Append1[Weed],Append1[Value.1])

vzhangti_12-1667269114907.png

Is this the result you expect?

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

 

 

Hi @v-zhangti , I've only just worked this out and it works prefectly, thank you!

danextian
Super User
Super User

Hi @joannerw ,

 

Instead of an image, can you please post your sample data as a text table? It will be easier for anyone who wants to help that way.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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