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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
AbdulAzizAmod
New Member

Filling in blanks on a matrix

Good Day all,

 

I created a matrix that displays a count of incidents within a specific state and the time elapsed since their inception. I get some blanks within the matrix which I'd like to fill with zeroes. I'm not sure what the measure formalue should be. 

 

Please assist.

10 REPLIES 10
Addaxian
Frequent Visitor

Did you find a solution to this that you can share.  I have the same requirement and would love to find a solution.

Just add a 0 at the end of the measure calculation:

Sum Sales = SUM(Tables[sales]) + 0





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Thanks Paul for the response, but the issue is that data row does not exist for that crosssection of category and date (and the data field is not a measure field).  Even if you create a measure to sum the data and add a 0 it will not work because there is no data on that crosssection to add a 0 to.

(See the response from Anonymous on 06-12-2017 - They went into a little more detail on it.).

You need to create Dimension tables and  use these fields in the visual. Here is an example:

model.jpg

 

A simple SUM doesn't work, but SUM + 0, using the dimension table fields, show blank rows as 0

Captura de pantalla 2022-03-21 095352.jpg

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






gooranga1
Power Participant
Power Participant

if you create a measure could you set it to zero if it's blank?

 

I use the below formula to generate a zero value on an Esri ArcGIS map rather than a blank which messes the colouring of specific areas.

 

Total Call Number = if(ISBLANK(CALCULATE(sum(Fact_Glue_Data_Summary_Engineer_Data[Call Count Total]))),0,CALCULATE(sum(Fact_Glue_Data_Summary_Engineer_Data[Call Count Total])))
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @AbdulAzizAmod,

 

Have you tried the solutions provided above? Do they work in your scenario? If they work, could you accept them as solution to close this thread?

 

If you still have any question on this issue, feel free to post here. Smiley Happy

 

Regards

v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @AbdulAzizAmod,

 

Could you try using the formula below to create a new measure to calculate the count of incidents, then show the measure on the Matrix to see if it works? Smiley Happy

count of incidents = COUNTA ( 'Your_Table_Name'[IncidentsColumn] ) + 0

 

Regards

Anonymous
Not applicable

I think i know what you are getting at.  When you place a field into the matrix, anytime your matrix does not have a value that relates to that row and that column, the matrix shows blank.

At first i was thinking "Oh this is easy, we'll fix it with a measure".  Nope, still shows blanks.

Ok, no worries, i'll use a date dimension table to make sure i have each date represented in my test matrix and that will force my measure to calculate for each!  Ok... that didn't work either.

I don't know what the solution is either.  It would be nice to have a toggle switch in the Visualisation options.

dilumd
Solution Supplier
Solution Supplier

Hi

 

You can use replace values function when you import data into your model.

 

E.G. replace null with Zero

 

Power BI Help.JPG

The problem in my scenario is likely similar in that there is nothing to replace; a data row does not exist for that crosssection of category and date.  

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.