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
enlamparter
Helper I
Helper I

Count measure not working for one field only

I'm working on creating a visual that states how many notices are resolved and how many notices are open. Each of these fields is a card, and use the measure below to pull the number of records with the Open or Resolved statuses:

 

Resolved Notices = calculate(count(tblNotice[noticeStatus]),tblNotice[noticeStatus]="Resolved")

Open Notices = calculate(count(tblNotice[noticeStatus]),tblNotice[noticeStatus]="Open")

 

For some reason, resolved notices updates correctly upon refreshing the data, but Open Notices stays at a value of one (which, it's worth noting, was never actually one to begin with as there were seven Open Notices when I originally loaded the table).

 

Any ideas why this could be acting up?

 

1 ACCEPTED SOLUTION

I think I've solved the issue actually--I had a brainstorm and realized the problem was a slicer I put in that was filtering on the resolution date. Oops!! And to think I spent an hour on this.

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

I have to guess that what you THINK says "Open" does not actually say "Open".  Maybe a space before/after?

 

Only other thing I can say is that I tend to use COUNTROWS(tblNotice), instead of COUNT( ) -- but I don't *think* that makes any difference.

 

 

Thanks for your reply scottsen,

 

Not sure if this would change anything but I've noticed now that if I set a report level filer, the filter box does seem to acknowledge that there are 8 open notices. However the visual still reads "1". Does that make any difference?

 

I'm going to try playing with leading/trailing spaces now and see if that might have anything to do with it.

Anonymous
Not applicable

In your table, you could add a calculated column that is just   IsOpen = tblNotice[noticeStatus] = "Open"  and make sure you are getting a "TRUE" where you expect?

It's returning "true" for all values I expected 😕

I think I've solved the issue actually--I had a brainstorm and realized the problem was a slicer I put in that was filtering on the resolution date. Oops!! And to think I spent an hour on this.

Anonymous
Not applicable

Bam!  Congrats 🙂

Anonymous
Not applicable

woah.

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.