0
votes

I'm a newbie in Power BI and I'm now stuck with a visualization problem. I have an Excel table with columns about (1) the title of a news article and (2) the date when it was published. As seen on the screenshot from Excel, there are months on which nothing was published.

I need to make a stacked column chart in Power BI from it. First, the one I made shows only years, while I want to see months. Second, I'd like to see each month, including those that have the value of 0 (i.e. nothing was published on this month). Thus my aim is to have 48 month columns instead of my 4 columns for years. Thanks a lot in advance!

Initial data, Excel

The Power BI stacked column chart that I want to tweak

1

1 Answers

0
votes

I assume you are using auto date/time in Power BI Desktop, for simplicity:

  • Create a new bar chart visualisation
  • Drag the Date column into the Axis field
    • The Date column should transform into a hierarchy - remove Quarter from this hierarchy
    • If the Date column does not show up as a hierarchy, right click Date in the Axis field and select Date Hierarchy
  • Drag the Title column into the Values field
  • Right click Date in the Axis field and tick Show Items With No Data
  • Click the visualisation in the canvas and press the button that looks like one arrow that splits into two arrows, to expand all down one level in the hierarchy

This should get you what you are after:

enter image description here

You can deselect Concatenate Labels for your X-axis to get this result.