Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
JSR
Helper II
Helper II

Cannot convert value '' of type Text to type Number.

Hi,

I do have null values for EndDate, having a calculated colum like this, why Power BI complains with:

Cannot convert value '' of type Text to type Number.

 

First part of the IF statmenet Not(ISBLANK) , should not get rid of null values? So in the second part of the IF, should not fail as it should be there only if Enddate is not null?

 

Column = IF(
Not(ISBLANK('aux_resourceworkingdays'[EndDate])) && 

VALUE(
YEAR(NOW())
& FORMAT(MONTH(NOW()), "00")) > 

VALUE(
YEAR('aux_resourceworkingdays'[EndDate])
& FORMAT(MONTH('aux_resourceworkingdays'[EndDate]), "00")
),"False","true"
)

 

 

1 ACCEPTED SOLUTION
NikhilChenna
Skilled Sharer
Skilled Sharer

Hi @JSR , I thin kthe below is the solution,

 

1. you need to go the power query editor and select the table where you have EndDate column.

2. select the EndDate column and right click on the column and click on the option replace values and replace null to blanks.

3. this will solve your issue.

 

Regards,

Nikhil Chenna

 

Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!

View solution in original post

2 REPLIES 2
NikhilChenna
Skilled Sharer
Skilled Sharer

Hi @JSR , I thin kthe below is the solution,

 

1. you need to go the power query editor and select the table where you have EndDate column.

2. select the EndDate column and right click on the column and click on the option replace values and replace null to blanks.

3. this will solve your issue.

 

Regards,

Nikhil Chenna

 

Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!

NikhilChenna
Skilled Sharer
Skilled Sharer

Hi @JSR , I thin kthe below is the solution,

 

1. you need to go the power query editor and select the table where you have EndDate column.

2. select the EndDate column and right click on the column and click on the option replace values and replace null to blanks.

3. this will solve your issue.

 

Regards,

Nikhil Chenna

 

Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.