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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
zeusturbo
Frequent Visitor

Need to increment the date value in rows based on the coloumn value and duplicate the row values.

Hi,
I wanted to increment the date value based on a  particular column value. And also need to duplicate the entire rows by the values based on that column. I have an example below.

Capture.PNG

 

 

If you see the above image, the rows are duplicated based on values in the "Nights" columns and the "Date" column is incremented based on the "Nights" columns.

Please help me with it.

 

Thanks in advance..

 

4 REPLIES 4
daxer-almighty
Solution Sage
Solution Sage

It's dead easy if you use Power Query to do this. And in truth, it should be done via Power Query, not in DAX. DAX is not suitable for this kind of data manipulation. Power Query is.

Greg_Deckler
Community Champion
Community Champion

@zeusturbo - To follow-up on this, I did something similar to this in this Quick Measure: 

Blowout! - Microsoft Power BI Community

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler   

thanks for the response. here is the sample data. 

 

Name, Room no., RT., Adlt., Total_Person, Date, Nights, Price, Rate code, Stat., Group
Voegele, 116, D2D, 2/0/0/0/0, 2, 01/01/2016 ,7, 496, GR02, CO, X1
Petersen, 103, D2D, 2/0/0/0/0, 2, 05/01/2016, 2, 330, ARH Import, CO, X2
Michelin, 205, D2D, 2/0/0/0/0, 3, 07/01/2016, 5, 319, ARH04 ,CO ,X3

Greg_Deckler
Community Champion
Community Champion

@zeusturbo Inventing rows is tricky in Power BI. You will need to use GENERATE or GENERATESERIES in DAX to invent these rows. You may actually need to use both in conjunction with one another, essentially:

GENERATE(

  'Table',

  GENERATESERIES(...)

)

 

Can you post input sample data as text so that I can experiment with the right solution?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.