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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
JSR
Helper I
Helper I

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
Continued Contributor
Continued Contributor

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
Continued Contributor
Continued Contributor

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
Continued Contributor
Continued Contributor

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.