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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
jwb3d
Frequent Visitor

DAX command to duplicate rows

Hello, could someone assist me with the DAX commands needed to duplicate rows in a table? The command should reference a column that has a count greater than 1, duplicating the rows according to the count value. Thank you.

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @jwb3d ,

 

Can you please elaborate a little bit more on the requirements and supply some example?

 

But based on the overall understanding believe this is better done using Power Query and not DAX, but if you can share the example is easier to give you the correct approach.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

3 REPLIES 3
MFelix
Super User
Super User

Hi @jwb3d ,

 

Can you please elaborate a little bit more on the requirements and supply some example?

 

But based on the overall understanding believe this is better done using Power Query and not DAX, but if you can share the example is easier to give you the correct approach.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





jwb3d
Frequent Visitor

I need rows which have count column > 1 to be duplicated by the number of times the count represents. 

See the image below.

 

jwb3d_0-1775151630602.png

 

Hi @jwb3d 

 

For this you should use the Power querry because you cannot duplicata tows on a table already loaded só to use dad you would need to create a new table.

 

On Power query add a column with the followinf code

 

{1..[Count]}

 

This Will generate a list of values starting at 1 and ending in the number of the count inside the cell that you can then expand creating a repeted row for each value.

Then you can delete that new column


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.