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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It 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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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