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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Ju743878
Regular Visitor

Expand table rows by dates range from next row with group

Hi everyone, hope your are good !

 

I struggle with some manipulation :

In this i.e i want to transform dynamically this table : 

IDDT_DATETP_EVENT
101/01/2023OPEN
114/01/2023CLOSE
115/01/2023RE-OPEN
115/01/2023EXCEPTION
118/01/2023CLOSE
120/01/2023RE-OPEN
205/01/2023OPEN
210/01/2023EXCEPTION
217/01/2023CLOSE
317/01/2023OPEN
325/03/2023CLOSE

 

To this :

 

IDDT_DATETP_EVENT
101/01/2023OPEN
102/01/2023OPEN
103/01/2023OPEN
104/01/2023OPEN
105/01/2023OPEN
106/01/2023OPEN
107/01/2023OPEN
108/01/2023OPEN
109/01/2023OPEN
110/01/2023OPEN
111/01/2023OPEN
112/01/2023OPEN
113/01/2023OPEN
114/01/2023CLOSE
115/01/2023RE-OPEN
115/01/2023EXCEPTION
116/01/2023EXCEPTION
117/01/2023EXCEPTION
118/01/2023CLOSE
119/01/2023CLOSE
120/01/2023RE-OPEN
205/01/2023OPEN
206/01/2023OPEN
207/01/2023OPEN
208/01/2023OPEN
209/01/2023OPEN
210/01/2023EXCEPTION
211/01/2023EXCEPTION
212/01/2023EXCEPTION
213/01/2023EXCEPTION
214/01/2023EXCEPTION
215/01/2023EXCEPTION
216/01/2023EXCEPTION
217/01/2023CLOSE
317/01/2023OPEN
318/01/2023OPEN
319/01/2023OPEN
320/01/2023OPEN
321/01/2023OPEN
322/01/2023OPEN
323/01/2023OPEN
324/01/2023OPEN
325/03/2023CLOSE

 

In DAX; power query or even SQL as you prefer, someone can help me ?

 

Thanks in advance !

 

BR 

 

Julien

2 REPLIES 2
amitchandak
Super User
Super User

@Ju743878 , Create a date table and join date of date with Dt_date

 

new table

 

Date = calendarauto()

 

then have measures like

 

calculate(lastnonblankvalue(Table[DT_DATE], max(tbale[TP_EVENT])), filter(all('Date'), 'Date'[Date]<= max('date'[Date])))

 

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi, 

 

Thanks for your suggestion but unfortunatelly it's not the solution i aking for.

 

I want to expand the table row from date to next date row by ID, dynamicly...

 

BR

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.