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

Count 0 Values in Table

I have a table with a list of all Accounts & their sales 

 

I need to flag all Accounts what have 0 sales 

 

My Sales Measure is;

var TYQTY = [TY Qty] return

IF(ISBLANK(TYQTY),0,TYQTY)

TY QTY being a simple sum measure - but returns blanks not 0's

 

My current Has No Sales measure is;

CALCULATE(DISTINCTCOUNT('Sale Data'[Account No.]),FILTER('Sale Data',[Store TY Qty]=0))

I have tried both Count & DistinctCount - both return the same result - below

Lewis825_1-1636470966474.png

This is counting an account with £14 sales and not flagging those with £0

however this doesnt count the bottom £24 value? 

 

Please advise  

 

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous,

Can you please share a pbix or some dummy data that keep raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

vanessafvg
Super User
Super User

if it's in the same table then you can just go,  but this might be too simple to understand this issue.  Can you share the actual data you using in text format?  Including the columns you are using to derive your measures

 

CALCULATE(DISTINCTCOUNT('Sale Data'[Account No.]) , sales = 0)





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




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.