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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Count zeros only

I want to count customers with zero revenue only.  I'm able to count customers with revenue, but I can't make the inverse work no matter what formula I try.

 

This is my latest failure:

 

Zero Only = COUNTROWS(FILTER('All Cust','All Cust'[Revenue]="0"))

 

I've also tried this with no quotes around the 0.

 

I've tried so many ways and nothing will work.  My Revenue column is set to whole numbers, US currency.

 

Thanks

 

 

1 ACCEPTED SOLUTION

Hi @Anonymous,

 

As the picture showed, the upper is my test data and the bottom is the result. It works, which is the formula in your first post. Could you please post a snapshot of the result of yours? How does it show up in a Card visual?

 

Count zeros only.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

Community Support Team _ Dale
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

19 REPLIES 19
Interkoubess
Solution Sage
Solution Sage

Zero-Test.PNG

 

Hi @Anonymous

Did you try the formula Zero Only = calculate(COUNTROWS(the column),FILTER('All Cust','All Cust'[Revenue]=0))

I tried a formular silmilar to this and it worked ( image attached).

 

Thx.

Anonymous
Not applicable

I tried selecting just the table before FILTER and then the table with the revenue row and recieved BLANK even though I should have 11.

 

Zero Only = CALCULATE(COUNTROWS('All Cust'),FILTER('All Cust','All Cust'[Revenue]=0))

@Anonymous

 

Hi, Do you have Customers with 0 Revenue in the table? or have Customer with no rows in All Cust table?.

 

Can you post a screenshot of your data view.

 

Regards

 

Victor

Lima - Peru

 

 

 

 




Lima - Peru
Anonymous
Not applicable

It's customers with $0 in each row.  Zero revenue.JPG

@Anonymous

 

 

You have something like this in your table AllCust?

 

Lok.png




Lima - Peru
Anonymous
Not applicable

Oh, yes, sorry about that.

 

Zero revenue.JPG

Hi @amy22x3.

 

Please try this formula

 

Zero Only = CALCULATE(COUNTROWS('All Cust'[ISP Name]),FILTER('All Cust','All Cust'[Revenue]=0))

 

Thanks

Hi @Anonymous.

 

Please try this formula

 

Zero Only = CALCULATE(COUNTROWS('ISP Name'),FILTER('All Cust','All Cust'[Revenue]=0))

 

Thanks

Anonymous
Not applicable

Comes back as BLANK every time

 

Zero Only = CALCULATE(COUNTROWS('Distinct Cust'),FILTER('All Cust','All Cust'[Revenue]=0))

Hi @Anonymous,

 

Another try, if it does not work then I eally don,t understand...

 

Zero Only = CALCULATE(COUNT('All Cust'[ISP Name]),'All Cust','All Cust'[Revenue]=0)

 

Let us know...

 

Ninter

Anonymous
Not applicable

BLANK

 

I just don't get it, there's  11 zeroes there and I've made sure it's properly formatted.  

 

Zero Only = CALCULATE(COUNT('All ISPs'[ISP Name]),'All ISPs','All ISPs'[Revenue]=0)

 

And this comes back with 51 which is the total count:

 

Zero Only = CALCULATE(COUNT('Distinct ISP Name'[Corporation]),'All ISPs','All ISPs'[Revenue]=0)

 

 

Hi @Anonymous,

 

As the picture showed, the upper is my test data and the bottom is the result. It works, which is the formula in your first post. Could you please post a snapshot of the result of yours? How does it show up in a Card visual?

 

Count zeros only.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Still showing BLANK.  Is it possible I have formatting wrong?  This is just way too hard for something that should be simple.  😞  

 

Count 0.JPG

Hi @Anonymous,

 

Are there any filters or slicers?

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

None.  I loaded this dataset as a completely seperate excel file, so it's free of all filters.

Anonymous
Not applicable

For some reason this formula just now worked.  I have no idea what changed. 

 

Zero Only = COUNTROWS(FILTER('All ISPs','All ISPs'[Revenue]=0))

 

Thanks for all your help, I really appreciate your time!

Anonymous
Not applicable

I can't just select a column after Calculate(countrows I'm forced to select the entire table.  

 

Zero Only = CALCULATE(COUNTROWS('All Cust'),FILTER('All Cust','All Cust'[Revenue]=0))

Anonymous
Not applicable

Zero Only = CALCULATE(COUNTROWS('All Cust'),'All Cust','All Cust'[Revenue]=0)

 

 

It comes back with (Blank) even though I have 11 customers with 0.

Anonymous
Not applicable

 Zero Only = CALCULATE(
	COUNTROWS('All Cust'),
	'All Cust',
	'All Cust'[Revenue]=0
)

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.