cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Anonymous
Not applicable

Getting rid of "null" results

Goodevening everyone,

 

I have an issue with a "NULL" notification.

The whole day i am looking for a solution, but can't find the wright one, which will works on mine.

 

With a query i become data out of our system.

One of the given data becomes in the column "OptioneleOnderdelen"

In some cells i have the correct information i will need, in others "NULL" and in other cells the one is empty.

 

MeAlfons_0-1664564418455.png

But when i will use this table for a new custom column, the solution is everywhere fine, except the ones with the result "NULL".

This results in an "Error".

 

Does someone knows how i can change the type "NULL" to an empty cell, when the column has no data filled ?

 

My last try was in in the Advanced Editor by placing the code:

#"Changed Type 5" = Table.ReplaceValue(#"Changed Type",each[OptioneleOnderdelen],each if [OptioneleOnderdelen]=null then 0 else 0 ,Replacer.ReplaceValue,[Optionele Onderdelen])

 

Unfortunatly without result.

 

Greets, 

 

Alfons

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

@Anonymous,

best to let Power Query build the code for you.  Delete the last step you highlighted. Then add a new step as follows:

1) Right click on your column Optioel....

2) Select the Replace Values option in the dropdown.

 

rsbin_0-1664568241985.png

Type in null and then leave blank or put in 0...whatever you prefer.

 

 

 

View solution in original post

5 REPLIES 5
rsbin
Super User
Super User

@Anonymous ,

Try changing your code to this:

= Table.ReplaceValue(#"ChangedType",null,"",Replacer.ReplaceValue,{OptioneleOnderdelen})
//You can replace the "" with 0 if you prefer.

Hope this works for you.

Regards,

Anonymous
Not applicable

Hello rsbin,

 

THank you for the fast response.

 

I have filled your text in, in the "Advanced Editor".

But this does not work.

I am wondering if i am putting this in the wright way on the wright place.

 

MeAlfons_0-1664567332125.png

 

@Anonymous,

best to let Power Query build the code for you.  Delete the last step you highlighted. Then add a new step as follows:

1) Right click on your column Optioel....

2) Select the Replace Values option in the dropdown.

 

rsbin_0-1664568241985.png

Type in null and then leave blank or put in 0...whatever you prefer.

 

 

 

Anonymous
Not applicable

Perfect!

 

So simple! My errors are gone.

My weekend starts good again.

 

Thank you!

 

Enjoy your weekend!

@Anonymous ,

Glad it worked for ya.  Enjoy your weekend as well!

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors