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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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

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

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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