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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Karthik12
Post Patron
Post Patron

Time difference between current output and previous output

Hello Folks,

My production server data has  time values in same coloumn (please refer attached picture).

Request your help to calculate the time difference between two outputs in my production data.

If one output was at 14:11 and another output is 14:14 means, I need to calculate the time between two outputs is 0.03 mins.

Like this, I need to calculate top 3 time difference of the selected day.

Is it possible?

Can you please support?

 

Time difference.jpg

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @Karthik12 ;

You could try it.

1.create a column

 

diff = 
var _last=
CALCULATE(MAX('Table'[Time]),FILTER('Table',[Time]<EARLIER('Table'[Time])&&[Date]=EARLIER('Table'[Date])))
return DATEDIFF(_last,[Time],SECOND)

 

2.set top 3:

vyalanwumsft_0-1667353682506.png

If the above one can't help you get the desired result, please provide a simple and your expected result with backend logic and special examples.


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yalanwu-msft
Community Support
Community Support

Hi, @Karthik12 ;

You could try it.

1.create a column

 

diff = 
var _last=
CALCULATE(MAX('Table'[Time]),FILTER('Table',[Time]<EARLIER('Table'[Time])&&[Date]=EARLIER('Table'[Date])))
return DATEDIFF(_last,[Time],SECOND)

 

2.set top 3:

vyalanwumsft_0-1667353682506.png

If the above one can't help you get the desired result, please provide a simple and your expected result with backend logic and special examples.


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-yalanwu-msft Thank you so much for the support. 

I have tried to attach my pbix file but couldn't find option.

So, attached as image.

I would like to get support for a time line graph for time intervals between latest time and previous time.

like below. Obvisiouly, first part time interval should be calculated as shift start time as indicated below.

 

Karthik12_0-1667371339966.png

 

 Hope this data give some clarity to you. If not, any alternate way to send pbix file to you?

Thanks in advance for your kind support !

 

Helpful resources

Announcements
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.