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

Count ID IF field contains specified text

Hello, 

New to Power BI so I will start with an apology. Lol

So I have a table that has the following fields:

  • ID
  • Name
  • Status

I have just a basic Count ID box on my report and have it filtered by specific work status' (see image below). However, if there are none of that status is says blank instead of 0. I know there is a formula to Count[ID] + 0 to get it to show zeros, but I suppose my problem is I have created these figures using the ask a question feature and am not sure how/where to edit them. I just simply said count ID if work status is "on leave". I just want to get it to say 0 not blank. Anyone able to point me in the direction of where/how to do that?

 

151E59E0-3FDD-4275-A351-7C582BD96E60.jpeg

1 ACCEPTED SOLUTION
lkalawski
Memorable Member
Memorable Member

Write a measure that will check if it is blank.

IF (Count (ID) = BLANK (), 0, Count (ID))

View solution in original post

2 REPLIES 2
lkalawski
Memorable Member
Memorable Member

Write a measure that will check if it is blank.

IF (Count (ID) = BLANK (), 0, Count (ID))
Anonymous
Not applicable

Thanks. I had no idea it was as simple as creating measure and using that instead of the ID field itself!

 

working like a charm.

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.