Power BI - Duplicate rows and re-label with unique identifier

CantGetRight

New Member
Joined
Jul 21, 2015
Messages
21
Hi there,

I am struggling with a data issue and want to find a way to clean up using Power BI. My data looks like this:

ID Number# of ProductsClassification
123451Tools
123462Manufacturing
123471Hardware

You'll notice that the ID number 12346 has 2 in the second column. My end result should look like below:

ID NumberID Number (Adjusted)# of Products# of Products (Adjusted)Classification
1234512345-111Tools
1234612346-121Manufacturing
1234612346-221Manufacturing
1234712347-111Hardware

In a nutshell, when there are >1 "# of Products" I want the row to be duplicated the number of times listed in "# of Products" and for there to be a new column which tracks the ID Number followed by "-" and the iteration of this ID number, thus creating a unique value for each Product #. In addition, a new column should only count "# of Products" as =1

I am a very new user to Power Bi so if it is possible to layout in detail how one would transform the data to achieve this desired outcome that would be really appreciated.

Thanks,
Mark
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Forum statistics

Threads
1,223,888
Messages
6,175,212
Members
452,618
Latest member
Tam84

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top