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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
ddalton
Resolver I
Resolver I

Merging Rows - Should I create duplicate tables first?

Hi,

 

I've a dataset that I've transformed to get into a reasonably suitable format for my needs so far. The transformations involve several filters, and a pivot column event/activity. Currently, I have data in a visual table that is useful but requires one final step to merge rows with the same ID. 

 

Before I go ahead with that, should I duplicate the current tables first? Particularly, I'm interested in creating a new table based on the information shown in the visual table. Is that possible? If so, will it still be linked to the original data import i.e., will it be linked to the imported dataset when it's rereshed (like how the applied steps in the Power Query Editor are linked). 

 

Below is a breakdown of the steps I've carried out so far, just to give some context. 

 

This is a representation of the data I started with:

 

IndexDate_TimeIDCodeValue
2227/05/2022 00:00573A1250
40627/05/2022 00:00229A1143
64527/05/2022 00:00601C1250
1527/05/2022 00:00477A1250
1527/05/2022 00:00477S1235
2027/05/2022 00:00482A1250
2027/05/2022 00:00482C1265
2827/05/2022 00:00488A1250
3427/05/2022 00:00494A1250
2827/05/2022 00:00488S1135
3427/05/2022 00:00494S1140
3927/05/2022 00:00499A1250

 

I pivoted the Code column with the Value column, and I now have something like this:

 

IndexDate_TimeIDA1C1S1
2227/05/2022 00:00573250  
40627/05/2022 00:00229143  
64527/05/2022 00:00601 250 
1527/05/2022 00:00477250  
1527/05/2022 00:00477 235 
3427/05/2022 00:00494250  
3427/05/2022 00:00494  140
3927/05/2022 00:00499250  
2827/05/2022 00:00488250  
2827/05/2022 00:00488  135
2027/05/2022 00:00482250  
2027/05/2022 00:00482 265 

 

The final step is to merge rows with the same Index such that I have this:

 

IndexDate_TimeIDA1C1S1
2227/05/2022 00:00573250  
40627/05/2022 00:00229143  
64527/05/2022 00:00601 250 
1527/05/2022 00:00477250235 
3427/05/2022 00:00494250 140
3927/05/2022 00:00499250  
2827/05/2022 00:00488250 135
2027/05/2022 00:00482250265 

 

 

1 ACCEPTED SOLUTION
negi007
Community Champion
Community Champion

@ddalton you can simply have this output without any transformation in the data like below

 

negi007_0-1654528947068.png

 

 

 




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



Proud to be a Super User!


Follow me on linkedin

View solution in original post

4 REPLIES 4
negi007
Community Champion
Community Champion

@ddalton you can simply have this output without any transformation in the data like below

 

negi007_0-1654528947068.png

 

 

 




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



Proud to be a Super User!


Follow me on linkedin

@negi007  That looks like a useful approach. However, I can't seem to add fields to "Rows" or to "Values". I only seem to have "Columns" available in the Visualization area:

 

ddalton_0-1654529909435.png

 

Ah. Realised you're likely using the Matrix visual instead of the Table. I'll give it a shot. 

ribisht17
Super User
Super User

@ddalton 

 

You should be able to achive this by grouping INDEX

 

You can create 3 measures which will throw maximum value for each INDEX,

 

For Example, 

new A1=CALCULATE(MAX(A1),ALLEXCEPT(TABLE_NAME,INDEX))

new B1=CALCULATE(MAX(B1),ALLEXCEPT(TABLE_NAME,INDEX))

new C1=CALCULATE(MAX(C1),ALLEXCEPT(TABLE_NAME,INDEX))

1527/05/2022 00:00477250  
1527/05/2022 00:00477 235

 

Regards,

Ritesh

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.