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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
LinVen
Helper I
Helper I

Count Text Values, but return ) not (Blank) - Power BI

Hi Folks

I created a measure to count how many Overdue projects appear in a list

Overdue Count = CALCULATE( COUNTROWS( 'Project Overview'), 'Project Overview'[Overdue Flag] = "Overdue")

I created the Overdue flag in the source table first, so line by line there is either Overdue / Near Due or blank cells

Where a Project Manager has no Overdue projects, the Measure returns (Blank) (in my card visual)
LinVen_0-1678391205473.png


Does anyone have any tips for telling the measure to return Zero instead?



1 ACCEPTED SOLUTION
edhans
Super User
Super User

Wrap your function with COALESCE.

So COALESCE([Your Measure], 0)

COALESCE returns the first non-blank value, so if Your Measure is blank, it will default to the 0.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

2 REPLIES 2
LinVen
Helper I
Helper I

Perfect Solution

LinVen_0-1678437954827.png



Thank You!

edhans
Super User
Super User

Wrap your function with COALESCE.

So COALESCE([Your Measure], 0)

COALESCE returns the first non-blank value, so if Your Measure is blank, it will default to the 0.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Kudoed Authors