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
hduck123
New Member

Replacing Blank Values with 0's (without adding new rows)

Hello,

 

I have some messy that returns the correct desired result, but I am having trouble replacing the blank values with 0's without adding new rows to the table.

 

There are two dimensions: Accounts and Items. Each item is associated with an account, but can have transactions on the fact tables at accounts it is not associated with. The two fact tables are cycles and processes. Both fact tables are related to both dimensions. 

 

When trying the IF(ISBLANK( pattern, additional rows are added to the table that do not exist in either of the transaction rows, which makes sense. Below is a screenshot of the data. The table on the bottom left is the correct result (using simple counts) and the table on the right is incorrect using the IF(ISBLANK( pattern.  

hduck123_0-1603309648045.png

 

How can this be achieved in DAX or through the UI?

1 ACCEPTED SOLUTION

I suggest you create an auxiliary measure that adds the 2 numbers together. This new measure can be placed in the visual-level filters in the filter pane. Set it to >0



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @hduck123 

 

It seems that you need to remove the rows with both count values are 0. So you can try adding measures like below and use them instead in the table visual.

 

Count - Cycles =
IF (
    [IfIsBlank - Cycles] = 0 && [IfIsBlank - Processes] = 0,
    BLANK (),
    [IfIsBlank - Cycles]
)


Count - Processes =
IF (
    [IfIsBlank - Cycles] = 0 && [IfIsBlank - Processes] = 0,
    BLANK (),
    [IfIsBlank - Processes]
)

 

 

Best Regards,

Community Support Team _ Jing Zhang

If this post helps, please consider Accept it as the solution to help other members find it.

I suggest you create an auxiliary measure that adds the 2 numbers together. This new measure can be placed in the visual-level filters in the filter pane. Set it to >0



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

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.