Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
Hi @maxkhan
Can you please use this dax:
Actual_Duration =
IF(
ISBLANK('Table'[Actual_EndTime]),
'Table'[Planned_Duration],
DATEDIFF('Table'[Actual_StartTime], 'Table'[Actual_EndTime], MINUTE) / 60
)
Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂
Kind Regards,
Poojara
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
Hi @maxkhan
Can you please use this dax:
Actual_Duration =
IF(
ISBLANK('Table'[Actual_EndTime]),
'Table'[Planned_Duration],
DATEDIFF('Table'[Actual_StartTime], 'Table'[Actual_EndTime], MINUTE) / 60
)
Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂
Kind Regards,
Poojara
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
hello @maxkhan
you asked a logic for DAX but your display shows Power Query? Power Query uses M not DAX.
What’s the Difference Between DAX and Power Query or M?
@Jihwan_Kim & @Poojara_D12 should have work in calculated column DAX not PQ.
Thank you.
This doesn't work
Hi,
I tried to create a sample pbix file like below, and please check the below picture and the attached pbix file.
DATEDIFF function (DAX) - DAX | Microsoft Learn
Expected result CC =
IF (
NOT ISBLANK ( data[actual_end_time] ),
DATEDIFF ( data[actual_start_time], data[actual_end_time], HOUR ),
data[planned duration]
)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
8 | |
8 | |
8 | |
6 |
User | Count |
---|---|
14 | |
12 | |
11 | |
10 | |
9 |