Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi all,
I have a table like this:
X.d | X.t | Y.d | Y.t |
23/11/2017 | 23:59:58 | 24/11/2017 | 00:00:03 |
Now what i want to know is the difference in seconds between X and Y. The record above will have an expected outcome of "5" I want the outcome to be a number not for example "00:00:05".
Any suggestions would be great,
Thanks in advance!
L.Meijdam
Solved! Go to Solution.
Out of my head:
= Duration.TotalSeconds(([Y.d]&[Y.t])-([X.d]&[X.t]))
Hi @MarcelBeug,
Thanks for providing a solution, it worked like expected.
In the meantime I also figured on a DAX solution although I had to merge my columns to a Date/Time column. After transforming my columns to 2 date/time columns I used this DAX formula. I'll also leave it behind for other people that might seek for a DAX solution.
Column = DATEDIFF(Table1[X.dt];Table1[Y.dt];SECOND)
Thanks for helping!
Best Regards,
L.Meijdam
Out of my head:
= Duration.TotalSeconds(([Y.d]&[Y.t])-([X.d]&[X.t]))
Hi @MarcelBeug,
Thanks for providing a solution, it worked like expected.
In the meantime I also figured on a DAX solution although I had to merge my columns to a Date/Time column. After transforming my columns to 2 date/time columns I used this DAX formula. I'll also leave it behind for other people that might seek for a DAX solution.
Column = DATEDIFF(Table1[X.dt];Table1[Y.dt];SECOND)
Thanks for helping!
Best Regards,
L.Meijdam
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 |
---|---|
81 | |
75 | |
60 | |
37 | |
33 |
User | Count |
---|---|
102 | |
56 | |
52 | |
45 | |
40 |