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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Measure Value

Hi All,

 

I've filtered a column in my report using the below measure:

 

Electric Deals = CALCULATE(COUNT(Deals[TypeName]), FILTER(Deals,Deals[TypeName]= "Electric"))
 

If there a possibility that I get "0" instead of Blank whereever there is no data for Electric Deals?

 

Please see highlited area below: 

 
 
 

Himanshu_13_0-1608638128034.png

Regards,

Himanshu

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , Add +0 to the measure

 

Electric Deals = CALCULATE(COUNT(Deals[TypeName]), FILTER(Deals,Deals[TypeName]= "Electric")) +0

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

View solution in original post

AlB
Community Champion
Community Champion

Hi @Anonymous 

adding a zero, as already pointed out, is the most direct solution. Another option is:

Electric Deals =
VAR aux_ =
    CALCULATE (
        COUNT ( Deals[TypeName] ),
        FILTER ( Deals, Deals[TypeName] = "Electric" )
    )
RETURN
    COALESCE ( aux_, 0 )

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

View solution in original post

4 REPLIES 4
AlB
Community Champion
Community Champion

Hi @Anonymous 

adding a zero, as already pointed out, is the most direct solution. Another option is:

Electric Deals =
VAR aux_ =
    CALCULATE (
        COUNT ( Deals[TypeName] ),
        FILTER ( Deals, Deals[TypeName] = "Electric" )
    )
RETURN
    COALESCE ( aux_, 0 )

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

amitchandak
Super User
Super User

@Anonymous , Add +0 to the measure

 

Electric Deals = CALCULATE(COUNT(Deals[TypeName]), FILTER(Deals,Deals[TypeName]= "Electric")) +0

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
Anonymous
Not applicable

Thanks !!! it solved my issue.

 

Regards,

Himanshu

aj1973
Community Champion
Community Champion

Hi @Anonymous 

Use this measure

IF(ISBLANK(Electric Deals), '0', Electric Deals)

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.