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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
dexter2424
Helper I
Helper I

If statement 100% true, and false statement is not showing 0 in cards

Hi All,

 

I need some help in Power BI. 

I would like to build a card view (with Multi-Row Card Visual) where I would like to show the count of true and false values. The problem with it, that right now all of the data is "True" , but in the future maybe it's going to be "False" so I would like to write in cards, that:

True: 12 342

False: 0

 

But now I only see this:

True 12 342

 

because there is no false value, so it doesn't appear. 

 

Is there any way to show the 0 values as well?

 

Thanks,

Dexter

 

2 ACCEPTED SOLUTIONS
jthomson
Solution Sage
Solution Sage

Add +0 to your measure. If whatever you're feeding in isn't currently a measure, make it a measure

View solution in original post

v-alq-msft
Community Support
Community Support

Hi, @dexter2424 

 

Based on your description, I created data to reproduce your scenario.

Table:

d1.png

 

You may create two measures as below.

True = 
var tab = 
SUMMARIZE(
    ALL('Table'),
    'Table'[ID],
    'Table'[Value],
    "Flag",
    IF(
        'Table'[Value]>0,
        "True",
        "False"
    )
)
return
COUNTX(
    FILTER(
        tab,
        [Flag] = "True"
    ),
    [ID]
)

False = 
var tab = 
SUMMARIZE(
    ALL('Table'),
    'Table'[ID],
    'Table'[Value],
    "Flag",
    IF(
        'Table'[Value]>0,
        "True",
        "False"
    )
)
return
COUNTX(
    FILTER(
        tab,
        [Flag] = "False"
    ),
    [ID]
)+0

 

Result:

d2.png

 

Best Regards

Allan

 

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

 

 

View solution in original post

3 REPLIES 3
v-alq-msft
Community Support
Community Support

Hi, @dexter2424 

 

Based on your description, I created data to reproduce your scenario.

Table:

d1.png

 

You may create two measures as below.

True = 
var tab = 
SUMMARIZE(
    ALL('Table'),
    'Table'[ID],
    'Table'[Value],
    "Flag",
    IF(
        'Table'[Value]>0,
        "True",
        "False"
    )
)
return
COUNTX(
    FILTER(
        tab,
        [Flag] = "True"
    ),
    [ID]
)

False = 
var tab = 
SUMMARIZE(
    ALL('Table'),
    'Table'[ID],
    'Table'[Value],
    "Flag",
    IF(
        'Table'[Value]>0,
        "True",
        "False"
    )
)
return
COUNTX(
    FILTER(
        tab,
        [Flag] = "False"
    ),
    [ID]
)+0

 

Result:

d2.png

 

Best Regards

Allan

 

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

 

 

amitchandak
Super User
Super User

Add + 0 to your formula. Or use this option.

 

ShowItemwithoutdata.JPG

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
jthomson
Solution Sage
Solution Sage

Add +0 to your measure. If whatever you're feeding in isn't currently a measure, make it a measure

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors