Forum Discussion
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
- parry2kSuper 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 - danextianSuper 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
- AnonymousNot applicable
thanks, I tried both of these approached and neither worked.
- danextianSuper User
Anonymous , Are you able to attached your pbix with the data source?
- AnonymousNot applicable
Here is a screen shot. once pivoted, I can't get the nulls replaced with zeros to save back