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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Danyal
Regular Visitor

Row based time calculation

Good Day everyone

 

I need a measure where i can show hours/mins 1 customer took from one to another move?

 

 

Danyal_0-1690371435122.png 

Danyal_1-1690371455654.png

 

data_source_veiw


P_ID      Customer            Move_Name    Move_ID  change_time

9250botanaNew 37/24/2023 6:25
9250botanaHold57/24/2023 6:29
9118GysaNew 37/23/2023 13:08
9118GysaApproved117/23/2023 13:08
9118GysaWon27/23/2023 13:11
9118GysaBusiness157/24/2023 7:03
9275hanaNew 137/24/2023 10:45
9275hanaHold57/24/2023 10:46
9157hhmaakka2New 37/20/2023 6:50
9157hhmaakka2 Approved117/20/2023 9:25
9157hhmaakka2 Won27/20/2023 10:21
6748iflashNew 37/24/2023 13:27
6748iflashHold57/24/2023 13:28
9116coffeeNew 37/23/2023 8:48
9116coffeeQualified107/23/2023 8:48
9116coffeeWon27/23/2023 8:24
9116coffeeBusiness157/23/2023 8:23
9146w2fgiiNew 37/20/2023 7:17
9146w2fgiiHold57/20/2023 7:23
9146w2fgiiQualified107/20/2023 7:33
9146w2fgii Approved117/20/2023 7:35
2 REPLIES 2
Danyal
Regular Visitor

HI @SamInogic ,

 

Thank you so much for helping out.

 

the provided measure seems fine but i doubt one thing, lets say one Move has 3 or more ids as one move will go under sevaral moves, so the goal is to calculate hours or minuts that a customer has spent in each move or from one to another move.

so the ultimate result would be i will create 2 slicers to select desied moves and it will show the hours or mintus that customer and move has taken.

 

thanks again for your input.

😊

SamInogic
Super User
Super User

Hi @Danyal ,

As per our understanding, you want to calculate the date difference between dates of “change_time” column as mentioned in the “data_source_veiw” table.

So, you can try to create a measure with below DAX expression,

diff =

    var _min=CALCULATE(MIN(data_source_veiw[change_time]),ALLEXCEPT('data_source_veiw',data_source_veiw[P_ID]))

    var _max=CALCULATE(MAX(data_source_veiw[change_time]),ALLEXCEPT('data_source_veiw',data_source_veiw[P_ID]))

return

    DATEDIFF(_min,_max,MINUTE)

 

Please refer to the below screenshot for the same,

SamInogic_0-1690875061365.png

 

Thanks!

Inogic Professional Services Division

Power Platform and Microsoft Dynamics 365 CRM Development – All under one roof!

Drop an email at crm@inogic.com

Services:  http://www.inogic.com/services/

Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

Inogic Professional Services: Power Platform/Dynamics 365 CRM
An expert technical extension for your techno-functional business needs
Service: https://www.inogic.com/services/
Tips and Tricks: https://www.inogic.com/blog/

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.