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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Conditional Formatting - Find/Replace

Hi there,

 

Is it possible to do a find/replace on a grid so that I can create a rule where if the cell in the grid is null I can have a 0 show up instead? I have two tables joined together and one of the categories in one table is not in the other so the metrics show as null. I cannot do a find/replace in the Query editor because the category doesn't exist in the other table. 

The only thing I can think of right now is to add a row to the table with the missing category and fill in all the metric values with 0 but it's pretty bad practice to modify the original dataset itself so I'd prefer not to do that.

 

I am a former MicroStrategy user so I'm used to having this functionality but it looks like it's not available in PowerBI. Please prove me wrong!!

1 ACCEPTED SOLUTION

Hi @Anonymous ,
If what you are trying to do is a visual, you can use a measure:

Budget2 measure = IF(MAX(ExpensesTable[Budget])>0,MAX(ExpensesTable[Budget]),0)

merge234.PNG

 


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





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

Proud to be a Super User!




View solution in original post

4 REPLIES 4
Nathaniel_C
Super User
Super User

Hi @Anonymous ,
I am not sure I undertand the constraint you mentioned but have you read this? https://community.powerbi.com/t5/Desktop/Replace-multiple-nulls-at-once-in-Power-Query/td-p/166739
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





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

Proud to be a Super User!




Anonymous
Not applicable

No unfortunately that does not solve my problem. I attached a photo which hopefully clarifies my situation so you can see why I cannot do a find/replace in the Query Editor to replace all the nulls with zeros.Table Screenshot.JPG

Hi @Anonymous ,
So, operating on the ExpensesTable I merged the two, see bottom picture. Then expanded and ended up with the null in middle picture. Finally in the top picture, I did a replace value.  If your concern is adding a column to an existing table in the process, you can always copy or reference the table before you begin this process.  

Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
merge23.PNG

 

merge2.PNG

 

merge.PNG

 





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

Proud to be a Super User!




Hi @Anonymous ,
If what you are trying to do is a visual, you can use a measure:

Budget2 measure = IF(MAX(ExpensesTable[Budget])>0,MAX(ExpensesTable[Budget]),0)

merge234.PNG

 


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





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

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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