Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I'm trying to calculate duration with two columns from two tables.
I've tried adding a column in one of the tables with this code:
Solved! Go to Solution.
A column called "ID".
OK
Finally got it with this:
Try SELECTEDVALUE()
Duration = DATEDIFF( SELECTEDVALUE('Started'[Start Time]), SELECTEDVALUE( 'Completed'[End Time]), MINUTE )
Try something like this...
Duration = DATEDIFF(MAX('Started'[Start Time]),MAX(Completed[End Time]),MINUTE)
It "works", it justs displays the same result for every row.
What's the relationship between the two tables?
A column called "ID".
OK
Finally got it with this:
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.