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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
dkehoe32
Helper I
Helper I

cannot convert type text to number

Hi,

Im trying to find the price impact by subtracting the "2017 AUP" from the "net unit price (int)(converted).  One of the values in 2017 AUP is "No PY AUP," which is giving me the error.  Every time I try to subtract it gives me the error that they couldnt convery "No PY AUP" fom type text to type number.  power BI forum.PNGforum 2.PNG

 

Dylan

1 ACCEPTED SOLUTION

You could make a calculated column saying newcolumn=if(yourtable[2017 AUP]="No PY AUP",blank(),yourtable[2017 AUP]), but I'm not sure why you would want to do that outside of the query editor

View solution in original post

4 REPLIES 4
jthomson
Solution Sage
Solution Sage

Depends on what your desired outcome is. You could replace the value that's causing the error with a null, or you could put in some conditional logic whereby if the 2017 AUP value is No PY AUP then give it whatever value you need the calculation to be, else do the calculation as normal

is there a way to convert it to a null set thats not in the query editor?

You could make a calculated column saying newcolumn=if(yourtable[2017 AUP]="No PY AUP",blank(),yourtable[2017 AUP]), but I'm not sure why you would want to do that outside of the query editor

That works thanks for the help!

My query editor for some reason doesnt line up so if i were to edit it the query it wouldnt affect my table.

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.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors