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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
NikNithiy
Helper I
Helper I

Matrix/Table Visual - Show Blank Values as Zero

Hi Team,

I want to just show the blanks as zero in my table/matrix visual. But when i add a zero at the end of measure it is getting drill down and showing unwanted results means the data behind(filters removed) is also adding and showing as zero. but my expectation is to show only the blanks as zero with filters in measure/visuals remains. sample visual is below.

NikNithiy_0-1690463282255.png

 

when add a zero at end of measure 

 

NikNithiy_1-1690463602161.png

 This happen in both table and matrix visual have said that my measure as a filter function for ex

calculate(Tab1[count(id)],filter([tab2],tab2[area]="123"))

 

4 REPLIES 4
Mkarwa-123
Resolver II
Resolver II

Hi @NikNithiy  On top of your DAX measure you can put a condition
IF( value = NULL, 0, value)

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

Syk
Super User
Super User

Try using the COALESCE function. This will get the first non-blank value so just pass a 0 as the second argument.

https://learn.microsoft.com/en-us/dax/coalesce-function-dax

I was not able to dervice this can you please tell me how use the coleasce to this measure "calculate(Tab1[count(id)],filter([tab2],tab2[area]="123"))"

coalesce_measure =
COALESCE (
    CALCULATE ( COUNT ( Tab1[id] ), FILTER ( tab2, tab2[area] = "123" ) ),
    0
)

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.