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
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
Employee
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
Employee
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
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.