简体   繁体   中英

DAX Excel Power Pivot: Time Difference in Decimal

I am using Power Pivot for Data Analysis. I have two Date/Time fields and I wanted to calculate Time Difference between them in Decimal Hours.

eg

Date/Time 1 = 30-06-2022 23:58:56 Date/Time 2 = 01-07-2022 02:30:00

So the time difference between them is 2 hours 32 minutes. So in decimal it should show 2.5x hours.

I need this data in Calculated Column. How to achieve this in Data Model of Power Pivot?

Thanks in advance!

Simply

( [Date/Time 2] - [Date/Time 1] ) * 24

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM