How to add or subtract seconds from a datetime in DAX

7.5k views Asked by At

I have a datetime column and a int column representing a number of seconds. I'd like to calculate the sum of the two.

For example:

2017-08-01 18:00:00 + 180 (seconds) = 2017-08-01 18:03:00

The DAX DateAdd function only supports adding a year/month/day and not seconds, so I'm stuck!

1

There are 1 answers

0
Marc Pincince On

Given this table:

enter image description here

Adding a column with this: =[Column1]+TIME(0,0,[Column2])

Will give you this:

enter image description here