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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
brockshagena
Frequent Visitor

Getting nulls to show up as zero in Matrix

I am working on a project reporting on call center activity data.  The issue I am running into is when displaying Agent call data in a matrix table (or any ohter visual) if the agent made no calls for that day the agent does not show up int the matirx.  The users are accustomed to an excel table where all users are present but display a 0 in the colums  if they did not make any calls. Not sure the best way to achieve this.

 

Thanks

1 ACCEPTED SOLUTION
Bibiano_Geraldo
Super User
Super User

Hi @brockshagena ,

My sample table look like this:

Bibiano_Geraldo_0-1734208609187.png

 

Our goal its to sum the sales, but even if a day dont have sales, we want to display in the Matrix.

if we use a simple sum like:

Sales Amount = SUM(Sheet1[Sales])

 Our return will ignore days with no sales:

Bibiano_Geraldo_1-1734208832813.png

But when we add + 0 at the end of function like bellow DAX, the Matrix will now display all days:

Sales Amount = SUM(Sheet1[Sales]) + 0

Bibiano_Geraldo_2-1734208929497.png

you can achieve the same by this DAX:

Sales Amount = COALESCE(SUM(Sheet1[Sales]),0)

 

Or by showing items with no data:

Bibiano_Geraldo_3-1734209190062.png

 

 

View solution in original post

4 REPLIES 4
Bibiano_Geraldo
Super User
Super User

Hi @brockshagena ,

My sample table look like this:

Bibiano_Geraldo_0-1734208609187.png

 

Our goal its to sum the sales, but even if a day dont have sales, we want to display in the Matrix.

if we use a simple sum like:

Sales Amount = SUM(Sheet1[Sales])

 Our return will ignore days with no sales:

Bibiano_Geraldo_1-1734208832813.png

But when we add + 0 at the end of function like bellow DAX, the Matrix will now display all days:

Sales Amount = SUM(Sheet1[Sales]) + 0

Bibiano_Geraldo_2-1734208929497.png

you can achieve the same by this DAX:

Sales Amount = COALESCE(SUM(Sheet1[Sales]),0)

 

Or by showing items with no data:

Bibiano_Geraldo_3-1734209190062.png

 

 

Thank you!  this produced the results I was expecting (used a count() instead of a sum)

Ashish_Mathur
Super User
Super User

Hi,

Try this measure

Measure = coalesce([your measure],0)

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Sahir_Maharaj
Super User
Super User

Hello @brockshagena,

 

Can you please try the following approach:

 

Lets use this as a sample (Ensuring your tables have the necessary relationships)

Agent Name    Agent ID
John Doe      101
Jane Smith    102
Alex Brown    103

You can create a measure that counts calls and replaces nulls with zeros.

CallCount = 
VAR CallCountValue = SUM(CallActivityTable[CallCount])
RETURN
    IF(ISBLANK(CallCountValue), 0, CallCountValue)

Hope this helps.


Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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