Forum Discussion
abhilashmjoseph
2 years agoNew Member
How can I add additional duplicate rows in Power BI based on a specific number in a column?
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 n...
- 2 years ago
hello, abhilashmjoseph
to_list = Table.TransformColumns(your_table, {"Span (Months)", (x) => List.Repeat({1}, x)}), expand = Table.ExpandListColumn(to_list, "Span (Months)") - 2 years ago
You could add a custom column which creates list from 1 to span and then expand column to new rows.
={1 .. [Span (Months)] }
AlienSx
Super User
2 years agohello, abhilashmjoseph
to_list = Table.TransformColumns(your_table, {"Span (Months)", (x) => List.Repeat({1}, x)}),
expand = Table.ExpandListColumn(to_list, "Span (Months)")- abhilashmjoseph2 years agoNew Member
Thnak you for the response , but not quite clear can you please elaborate ?
- jwb3d5 months agoFrequent Visitor
I am unable to successfully format the proposed solution. I continually receive the error message: "A cyclic reference was encountered during evaluation." Could you kindly provide the complete function? Thank you.