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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

we cannot replace value null to type text

Looking for a simple solution

I am pivoting a table to create a column for each value

= Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[Status]), "Status", "Count")

it is returning some null values, which I want to convert to Zeros so they will work properly in Averages in a Matrix

So I trieds using replace values null with 0 and it seems to work fine until I try to apply the changes.

The columsn it creates are called Availalbe, Implemented, In Flight, and Roadmap.

 

Any ideas?

8 REPLIES 8
Anonymous
Not applicable

Here is a screen shot. once pivoted, I can't get the nulls replaced with zeros to save back

CVassalotti_0-1597880315551.png

 

danextian
Super User
Super User

Hi @Anonymous 


Did a test and replacing null in a column that is type number with zero works fine. The formula looks like this Table.ReplaceValue(#"PreviousStep",null,0,Replacer.ReplaceValue,{"Number"})

Try converting your number column to type text first, do a replace and convert it back to number after.  Alternatively, you may create a custom column with a formula similar to this if [Column] = null then 0 else [Column] and then delete the original column





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Anonymous
Not applicable

thanks, I tried both of these approached and neither worked.

@Anonymous , Are you able to attached your pbix with the data source?





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Anonymous
Not applicable

If I extract the data to a CSV and perform the same series of steps it works fine.  but not on my OData source.

@Anonymous that's interesting. You should open a support ticket. I hardly uses/had a chance to use ODAta so cannot help much but this seems to be a bug that it works with one type of data but not other. good luck and post your solution here so that it can help others.

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

I don't think I can share the data.

the problem occurs as soon as I pivot

= Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[Status]), "Status", "Count")

CVassalotti_0-1597880968919.png

 

parry2k
Super User
Super User

@Anonymous I think you need to share sample data/screen shots explaining what is not working, very hard to follow from your question what you are trying to solve here?

Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.