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

View all the Fabric Data Days sessions on demand. View schedule

Reply
jppuam
Helper V
Helper V

Calculate recursive diff Dates of complain customers

Hello,

i need to calculate the diff dates between the complains of certain customers.

 

For example in the image attached, for the first customer it has 4 complains (12 Mar, 3 Apr, 17 May and 20 May).

What i need to have, is on another column, the diff dates for the previews complain date.

The first would be 0, the second the diff of 3 Apr and 12 March, the 3rd, the diff of 17 May and 3 Apr...and so one...

for each customer ?

imagem1.jpg

 

Can you help me ?

thansk

Joao Rodrigues

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@jppuam , Try a new column as

nueva columna ?
datediff( maxx(filter(Table, [client code] ?earlier([client code] ) && [complain date] <earlier([complain date])),[fecha de queja]),[fecha de queja],día)+0

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

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@jppuam , Try a new column as

nueva columna ?
datediff( maxx(filter(Table, [client code] ?earlier([client code] ) && [complain date] <earlier([complain date])),[fecha de queja]),[fecha de queja],día)+0

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

Thansk amitchandak, it was just that.

😊

Hello,

in the post that i've made, i've forgot to refer also other column that i need, and if you could help.

Considering the control date the end of 2019 (31/12/2019), i need to know the difference of that date to the last date of each customer.

 

For example the first customer in my image is "1031". The last date é 20 May, so i need to calculate the difference from 31/12/2019 to 20/05/2019. Can you please help ?

Joao Rodrigues

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors