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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
bboy0009
Helper II
Helper II

replace empty value by null

Hi guys,

 

I hope you're doing well !

 

In my dataflow, on a text column X, I have applied a replace value step : "" to null. This one is necessary because I have added a column Y (with dax) to the same table which will take a value if the value in X is null.

 

For me , it's null

bboy0009_0-1674570685226.png

 

and it's empty

bboy0009_1-1674570720791.png

 

The problem is : in the dataflow, I do have null in the column X. But in the PBIX, the data that I retrieve from this dataflow are empty but not null. So the column Y doesn't have right value. So I think that the value null from the dataflow is interpreted empty in PBIX because the type is text

 

I have done a test to transform column X into whole number in the dataflow and I do retrieve null in the column X in the PBIX. So I think it is due to the data type of the column . 

 

Do you know how could I do to fix this without changing data type of X and without adding another step in the PBIX ?

 

Thank you in advance !

3 REPLIES 3
bboy0009
Helper II
Helper II

@collinq @djurecicK2 

Hi guys, 

thank you for the answer !

 

For more precision, There is a dataflow on which I have already applied the same replace value than yours @collinq . After that, I retrieve data from this dataflow for the PBIX and it's here that I have empty and not null value.That's the problem.

 

@djurecicK2 At the end, I would like to have null value and no empty value at all   

collinq
Super User
Super User

Hi @bboy0009 

 

I am not positive I fully understand your post but you can do a "replace value" step (without having to change the data type).  In the replace values, you don't do anything in the first box (do not hit space or anything) and in the second box put in the value you want like this:

collinq_0-1674584856612.png

 

 

Is that what you are looking for?




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

Proud to be a Datanaut!
Private message me for consulting or training needs.




djurecicK2
Super User
Super User

Hi @bboy0009 ,

 What is the end result you are looking for- are you trying to show Null and "" as separate vales in your slicer?

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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