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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
PatrickHudson
New Member

Eliminating sporadic duplicates and shifting data over

PatrickHudson_0-1672617054990.png

My data randomly has two charge codes scattered throughout a couple thousand lines. This offsets these rows by one column, I'd like to delete the duplicate Charge Code and have the data on those rows shift to the left to properly align. The screenshot shows an example of this on the second row. I've searched around for an answer to this, however I keep coming to solutions that address entire dupliate rows instead of just a duplicate column value or the trouble column is not mixed with correct data. Any advice in the right direction would be greatly appreciated. (First time poster) 

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @PatrickHudson ,

 

Since you have a partial row with two columns of Charge Code, you will have an extra column with null and the value of the previous column.

For example, the sample data is as follows.

vstephenmsft_0-1672628509922.png

You can duplicate one table, the primary table is table A, and the other is table B. Table A retains values and Table B retains null.

vstephenmsft_1-1672628865650.pngvstephenmsft_2-1672628872180.png

Then the columns of Table A and Table B are adjusted separately, and finally appended.

vstephenmsft_3-1672629317690.png

vstephenmsft_6-1672629395740.png

vstephenmsft_5-1672629343379.png

vstephenmsft_7-1672629420450.png

 

 

Best Regards,

Stephen Tao

 

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

1 REPLY 1
v-stephen-msft
Community Support
Community Support

Hi @PatrickHudson ,

 

Since you have a partial row with two columns of Charge Code, you will have an extra column with null and the value of the previous column.

For example, the sample data is as follows.

vstephenmsft_0-1672628509922.png

You can duplicate one table, the primary table is table A, and the other is table B. Table A retains values and Table B retains null.

vstephenmsft_1-1672628865650.pngvstephenmsft_2-1672628872180.png

Then the columns of Table A and Table B are adjusted separately, and finally appended.

vstephenmsft_3-1672629317690.png

vstephenmsft_6-1672629395740.png

vstephenmsft_5-1672629343379.png

vstephenmsft_7-1672629420450.png

 

 

Best Regards,

Stephen Tao

 

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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Solution Authors
Top Kudoed Authors