Forum Discussion

NidhiBhusari's avatar
NidhiBhusari
Helper IV
5 years ago
Solved

Difference between two date values that are in text format.

Hello,

I have two rows having year values named as START YEAR and END YEAR. But these values are in text format. Can anybody please help me in calculating difference between these two values.

startYearendYear
20172020
20012010
2018\N
20132020
20012006
2011\N
20172019
20092009
20032019
20122020
2021\N
2016\N
  • NidhiBhusari 

    you can create a column.

    Column = if('Table (2)'[endYear]="\N",blank(),int('Table (2)'[endYear])-'Table (2)'[startYear])

6 Replies