Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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 want to convert it to integer as I want to perform mathematical operation using this column. Any suggestion as to how I can convert the blank values to number as well
I tried replacing the blank values with 0 but still getting an error which is posted below:
And I need a calculated column because I cant do any changes in power query model as the data source is an online one and any changes in the structure in power query will cause an error the next time data is refreshed.
Solved! Go to Solution.
Try this one
YOB =
VAR DOB = Query1[Date of Birth]
RETURN IF(
ISBLANK(DOB) || DOB = "",
0,
VALUE(MID(DOB, 7, 4))
)
Thanks a lot!! It worked 🙏 . This was the catch that I missed ISBLANK(DOB) || DOB = ""
Try this one
YOB =
VAR DOB = Query1[Date of Birth]
RETURN IF(
ISBLANK(DOB) || DOB = "",
0,
VALUE(MID(DOB, 7, 4))
)
Thanks a lot!! It worked 🙏 . This was the catch that I missed ISBLANK(DOB) || DOB = ""
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 |
---|---|
10 | |
9 | |
9 | |
8 | |
8 |
User | Count |
---|---|
14 | |
12 | |
11 | |
11 | |
8 |