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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

How to calculate the time difference between the same column depending on the another column.

TIME DIFF FOR POWER BI.png

 

 

 

 

 

 

 

 

 

 

 

 

Here have the table of data, need to calculate the time difference of column "Time" according to between "Category" between B and A. Its like A-B -> 10:05 - 10.00 = 00.05.

 

Some times the Category values could be repeated on the some seconds value. still we need to calculate the time between A and B.

 

Thanks in Advance.

1 REPLY 1
amustafa
Solution Sage
Solution Sage

Hi @Anonymous calculating the time difference is the easy part. You need to define all different scenerios in your data first and provide a sample data in text format so it can be copied. 
Does the category values always A and B? If yes you can transform the data to a single line TIME A, TIME B then calculate the time difference.
What about the VALUE column, doe sit need to be considered in any calculation?
If Category repeats with som eseconds do should you take the latest or earliest value?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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