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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
dineshj
Helper I
Helper I

Giving blank fields a name

Hello!

I have data in one of my columns in excel sheet that have blanks. On a pie chart in PowerBI, these blanks show up as "blanks". How can I change the name blanks to something else, like "unrated". 

I rather do this in powerBi as I might have other columns that have blanks that I need to create charts on. 

 

Thank you!

1 ACCEPTED SOLUTION

@dineshj Yeah, so then just right click the column in Power Query and choose Replace values. Leave the top one empty and the second one "unrated". Will replace null's (blanks) with "unrated".

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WKkpNUdJRMlSK1YlWSi9KTc2D8+CMpJzSVAgnFgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", Int64.Type}}),
    #"Replaced Value" = Table.ReplaceValue(#"Changed Type","","unrated",Replacer.ReplaceValue,{"Column1"})
in
    #"Replaced Value"


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

I have a simular issue, I have a Spreadsheet that People enter data into for projects when they are assigned, at times these get entered but not assigned.  Want to put "Unassigned" in the Empty Visual. 

It reads like this. 

Project          Resource: 

Build 1          John Doe

Build 2          Jane Doe

Build 3          Jeffery Doe

Build 4                                <-- Blank - want these to read Unassigned

Build 5           Beckie Little

Greg_Deckler
Super User
Super User

@dineshj You can replace the blanks in Power Query with "unrated". Would need to know more though to know if this is a valid solution.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler Thank you for your reply. So in my column I have text that have colors mentioned, green, red, orange, and the blank cells. The pie chart is made up of these four fields. 

@dineshj Yeah, so then just right click the column in Power Query and choose Replace values. Leave the top one empty and the second one "unrated". Will replace null's (blanks) with "unrated".

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WKkpNUdJRMlSK1YlWSi9KTc2D8+CMpJzSVAgnFgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", Int64.Type}}),
    #"Replaced Value" = Table.ReplaceValue(#"Changed Type","","unrated",Replacer.ReplaceValue,{"Column1"})
in
    #"Replaced Value"


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Thank you! When I refresh the data next time, will it replace the null to Unrated automatically?

@dineshj Correct.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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