The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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!
Solved! Go to Solution.
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.
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.
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]))
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))
Result:
Regards,
Xiaoxin Sheng
User | Count |
---|---|
79 | |
78 | |
37 | |
33 | |
31 |
User | Count |
---|---|
93 | |
81 | |
59 | |
49 | |
49 |