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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Ortignano
Helper II
Helper II

Repeat row in a table

Hi,

I have a table with product number, qty and ID and another table with a number n (time to repeat) and m (start number)

I would modify first table repeating 

For example 

 

Product number qty ID

A                           2

B                           4

 

n=4 m=7

 

So I would have

Product number qty ID

A                           2    7

A                          2     8

A                          2     9

A                         2     10

B                         4     7

B                        4     8

B                        4     9

B                       4     10

 

Someone can help me?

 

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

somethink like this?

 

let
    Origine = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTJSitWJVnICskzALGcgy1gpNhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [prod = _t, qty = _t]),
    m=7,
    n=4,
    #"Aggiunta colonna personalizzata" = Table.AddColumn(Origine, "id", each List.Range({1..100},m-1,n)),
    #"Tabella id espansa" = Table.ExpandListColumn(#"Aggiunta colonna personalizzata", "id")
in
    #"Tabella id espansa"

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

somethink like this?

 

let
    Origine = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTJSitWJVnICskzALGcgy1gpNhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [prod = _t, qty = _t]),
    m=7,
    n=4,
    #"Aggiunta colonna personalizzata" = Table.AddColumn(Origine, "id", each List.Range({1..100},m-1,n)),
    #"Tabella id espansa" = Table.ExpandListColumn(#"Aggiunta colonna personalizzata", "id")
in
    #"Tabella id espansa"

Thank you is what I need

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Top Solution Authors