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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Ilka719
Frequent Visitor

Split by sum in Power bi

Hi!

How could I make so many duplicate rows if I have an amount in one row and that amount goes to 1?

Thanks in advance!

Ilka719_0-1692688791244.png

 

 

1 ACCEPTED SOLUTION
mlsx4
Super User
Super User

Hi @Ilka719 

 

In Power Query, add a custom column with this code: 

 

Table.Repeat(Table.FromRecords({[Col1=1]}),[Amount])

 

mlsx4_0-1692690610897.png

And now, expand values:

mlsx4_1-1692690645870.png

mlsx4_2-1692690672456.png

 

Finally, remove the original amount column, and rename the custom as Amount

mlsx4_4-1692690750452.png

 

 

View solution in original post

2 REPLIES 2
mlsx4
Super User
Super User

Hi @Ilka719 

 

In Power Query, add a custom column with this code: 

 

Table.Repeat(Table.FromRecords({[Col1=1]}),[Amount])

 

mlsx4_0-1692690610897.png

And now, expand values:

mlsx4_1-1692690645870.png

mlsx4_2-1692690672456.png

 

Finally, remove the original amount column, and rename the custom as Amount

mlsx4_4-1692690750452.png

 

 

Ilka719
Frequent Visitor

Great! Thank you!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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