Forum Discussion
ravi_ch
Helper I
4 years agoHow can we calculate dates difference
How can we calculate no. of days between two days like 2/12/2020 - 2/20/2020 = 8, 2/20/2020 - 3/24/2020 = 32 like this
truptis
Community Champion
4 years agoHi ravi_ch ,
You can do this is Power Query.
Step 1- Create an index column.
Step 2 - Add new custom column
paste this code in it:
= try #"Added Index"{[Index]-1} [Date] otherwise null
and then click on OK.
this step is going to take the date present in 2nd row to the first row.
Step 3: Create another column which has your result
Result = DATEDIFF([date], [new column that we created], DAY)
ravi_ch -> If this works, the please mark it as a solution.