Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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.
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..
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.
@zeusturbo - To follow-up on this, I did something similar to this in this Quick Measure:
Blowout! - Microsoft Power BI Community
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
@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?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |