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

No data presented where no rows exist

We are looking to have a PBI where it shows every day in the row (1-31) with categories as columns (cat1, cat2, cat3 etc) then a count of every item and if no sales were made then show 0. (see current/desired outcomes in table 3 and 4)

 

The issue we are having is that if we sell no items on a day or a category in that month then it will not show the column/row. (see table 2)

 

The data we are using is a line for each item which holds the category name and date/time of sale, therefore, if nothing is sold on the 3rd, then there is no data to show. (see table 1)

 

Table 1 - Data

DateDayItemCategory
01/11/2019111
02/11/2019223
05/11/2019531
05/11/2019541
05/11/2019551

 

Table 2 - Visualization

RowsDay
ColumnsCategory
ValuesCount of Items

 

Table 3 - Current Outcome (Matrix)

DayCat1Cat3
11 
2 1
58 
7 3

 

Table 4 - Desired Outcome (Matrix)

DayCat1Cat2Cat3
1100
2001
3000
4000
5800
6000
7003
1 ACCEPTED SOLUTION
pforrer7
Frequent Visitor

Hi @Anonymous,

 

If you don't have a Category table create one and relate it, then show the new category field on the columns of the matrix and then build a count measure like this one:

 

 

Item count = COUNT('Table'[Item])+0

 

Note the +0 at the end, which makes Power BI show zeros where there is no data.
 
image.png
Let me know if this works for you.

View solution in original post

2 REPLIES 2
pforrer7
Frequent Visitor

Hi @Anonymous,

 

If you don't have a Category table create one and relate it, then show the new category field on the columns of the matrix and then build a count measure like this one:

 

 

Item count = COUNT('Table'[Item])+0

 

Note the +0 at the end, which makes Power BI show zeros where there is no data.
 
image.png
Let me know if this works for you.
Anonymous
Not applicable

@pforrer7  thank you! 😊

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.