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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

SUMMARIZE a table with matrix, but show zeroes instead of blanks

Hello,

 

I'm trying to summarize a table, but I need there to be zeroes instead of blanks. Because there is no Aldi - Peanut - G - 2000 data in Sheet1, summarize does not create a zero for this; the same can be said for the other blanks.

 

Table = SUMMARIZE(Sheet1,Sheet1[Store],Sheet1[Flavor],Sheet1[Brand],Sheet1[Year],"variable","total","count",COUNT(Sheet1[ID]))

Capture.JPG

IDStoreFlavorBrandYear
1KrogerAppleA2000
2KrogerAppleA2000
3KrogerAppleB2001
4KrogerPearB2001
5KrogerPearC2002
6KrogerPearC2002
7WalmartPeachD2000
8WalmartPeachD2000
9WalmartPeachD2001
10WalmartPeachD2001
11WalmartPeachD2002
12WalmartPeachD2002
13WalmartSmokeyE2001
14MeijerSmokeyF2000
15MeijerSmokeyF2001
16MeijerSmokeyF2001
17MeijerCherryF2002
18MeijerCherryG2002
19AldiPeanutG2001
20AldiPeanutG2002
1 ACCEPTED SOLUTION
Anonymous
Not applicable

To solve this problem, I used both @ryan_mayu and @AilleryO solutions. My summarize function will work fine, but after that, you must create a "Year" table like ryan_mayu advises, then you must create a measure that adds 0 as AilleryO advises. For my case, that would be:

Measure = CALCUALTE(SUM('Table'[count]))+0

 

Thank you both for the help.

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

To solve this problem, I used both @ryan_mayu and @AilleryO solutions. My summarize function will work fine, but after that, you must create a "Year" table like ryan_mayu advises, then you must create a measure that adds 0 as AilleryO advises. For my case, that would be:

Measure = CALCUALTE(SUM('Table'[count]))+0

 

Thank you both for the help.

AilleryO
Memorable Member
Memorable Member

Hi,

Did you try to add 0 to your measure ?

MyMeasure = SUM( MyColumn) +0

Let us know.

 

v-priyankata
Community Support
Community Support

Hi @Anonymous 

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

ryan_mayu
Super User
Super User

@Anonymous 

you can create a new table 

 

Table 2 = DISTINCT('Table'[Year])
 
create relationship between two tables.
 
then add the year column from new table to the column field
 
11.png




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

This is a great solution if I do not use SUMMARIZE, but I unfortunately need to use SUMMARIZE for this because I'm going to union summarize tables to show different "variables" (column in my original post).

sry don't know why need to use summarzie function. What if you connect the new table to your summarized table?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.