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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
PorterHaus
Frequent Visitor

How to add month columns where data doesn't exist yet?

I'm trying to recreate a column chart that has sales totals for every month in the current year. Since it's for the current year there isn't data yet for some of the months. How can I still have the months as columns and just empty? Right now it only shows month columns for months that have data.

 

Thank you in advance!

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

Drag months from the calendar table.  Thereafter just select 'Show columns when there is no data".  I will be able to offer specific help if you share the link from where i can download your file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

 

Drag months from the calendar table.  Thereafter just select 'Show columns when there is no data".  I will be able to offer specific help if you share the link from where i can download your file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @PorterHaus,

 

For your requirement, I'd like to suggest you to manually create these missing records and use union function to merge them as a new table.
After these steps, use new table as the source of chart.

 

Sample table: records from 2015 to today.

Test = ADDCOLUMNS(CALENDAR(DATE(2015,1,1),TODAY()),"Year",FORMAT([Date],"yyyy"),"Month",FORMAT([Date],"mmmm"),"Amount",RANDBETWEEN(1,10)*DAY([Date]))

1.PNG

 

Table 2 = 
var miss_date=IF(YEAR(LASTDATE(Test[Date])+1)=YEAR(LASTDATE(Test[Date])),LASTDATE(Test[Date])+1)
return
UNION(Test,ADDCOLUMNS(CALENDAR(miss_date,DATE(YEAR(miss_date),12,31)),"Year",FORMAT([Date],"yyyy"),"Month",FORMAT([Date],"mmmm"),"Amount",0))

2.PNG

 

Result:

3.PNG

 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.