Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I would like to explore options for adding additional duplicate rows in Power BI based on a specific number in a column. For instance, as illustrated below, I aim to replicate my rows the same number of times as indicated in the 'Span(Months)' column. Can someone suggest an automated method for achieving this?
Solved! Go to Solution.
hello, @abhilashmjoseph
to_list = Table.TransformColumns(your_table, {"Span (Months)", (x) => List.Repeat({1}, x)}),
expand = Table.ExpandListColumn(to_list, "Span (Months)")
You could add a custom column which creates list from 1 to span and then expand column to new rows.
={1 .. [Span (Months)] }
You could add a custom column which creates list from 1 to span and then expand column to new rows.
={1 .. [Span (Months)] }
hello, @abhilashmjoseph
to_list = Table.TransformColumns(your_table, {"Span (Months)", (x) => List.Repeat({1}, x)}),
expand = Table.ExpandListColumn(to_list, "Span (Months)")
Thnak you for the response , but not quite clear can you please elaborate ?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
15 | |
15 | |
13 | |
12 | |
11 |