Forum Discussion
powerbidev123
1 year agoSolution Sage
Conversion issue from text to integer
I have column YOB which has data type text. it has some blank values and whole number values . When I try converting the column to whole number I get an error which says cant convert '' to integer. I...
- 1 year ago
Try this one
YOB = VAR DOB = Query1[Date of Birth] RETURN IF( ISBLANK(DOB) || DOB = "", 0, VALUE(MID(DOB, 7, 4)) ) - 1 year ago
Thanks a lot!! It worked 🙏 . This was the catch that I missed ISBLANK(DOB) || DOB = ""
aduguid
1 year agoMemorable Member
Try this one
YOB =
VAR DOB = Query1[Date of Birth]
RETURN IF(
ISBLANK(DOB) || DOB = "",
0,
VALUE(MID(DOB, 7, 4))
)
powerbidev123
1 year agoSolution Sage
Thanks a lot!! It worked 🙏 . This was the catch that I missed ISBLANK(DOB) || DOB = ""