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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Ralf123
Frequent Visitor

Fill missing month row with zero

I have 2 tables, 'All months table' and 'Events table'. I would like to get a new table (Result Table) in which the events are summarized and the missing months are filled with zero. Does anyone knows how I can do this?

 

tables.jpg

1 ACCEPTED SOLUTION
bullius
Helper V
Helper V

Hi @Ralf123,

 

First of all, I would model your data in your Events table differently, like this: 

Events table 
EventNameDate
Event X01/02/2017
Event X02/02/2017
Event X01/03/2017
Event X01/04/2017
Event X02/04/2017
Event X01/05/2017
Event X01/06/2017
Event Y01/01/2017
etc… 

 

I used a "Date" column because you have more than one instance of the same event per month.

 

Then, I would create a Calendar table, rather than an All Months table, e.g.:

 

Calendar =
ADDCOLUMNS (
    CALENDAR ( "01-Jan-2010", "31-Dec-2020" ),
    "Year", YEAR ( [Date] ),
    "Month", FORMAT ( [Date], "MM" ),
    "Month Name", FORMAT ( [Date], "MMM" )
)

Then create a relationship between the two tables using the [Date] column.

 

Then you should be able to create a Matrix visual that resembles your Result Table.

 

Let me know how you get on.

View solution in original post

2 REPLIES 2
bullius
Helper V
Helper V

Hi @Ralf123,

 

First of all, I would model your data in your Events table differently, like this: 

Events table 
EventNameDate
Event X01/02/2017
Event X02/02/2017
Event X01/03/2017
Event X01/04/2017
Event X02/04/2017
Event X01/05/2017
Event X01/06/2017
Event Y01/01/2017
etc… 

 

I used a "Date" column because you have more than one instance of the same event per month.

 

Then, I would create a Calendar table, rather than an All Months table, e.g.:

 

Calendar =
ADDCOLUMNS (
    CALENDAR ( "01-Jan-2010", "31-Dec-2020" ),
    "Year", YEAR ( [Date] ),
    "Month", FORMAT ( [Date], "MM" ),
    "Month Name", FORMAT ( [Date], "MMM" )
)

Then create a relationship between the two tables using the [Date] column.

 

Then you should be able to create a Matrix visual that resembles your Result Table.

 

Let me know how you get on.

Great, this did the trick.

 

You saved me a lot of time, thanks

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

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.