I have a data in below format and looking to get a stacked column chart as below. I am not sure how to club the dates and count together which are in multiple columns.
My data
I want to represent the above data in a clustered column chart where data on X-axis is clubbed in month and on Y-axis is clubbed with count of Yes per month like below based on different project types.
You will need to transform your data, add a Date table, add a relationship, and possibly a measure to do this.
1. Transform your data
You should unpivot your columns in PowerQuery to give you a table structure similar to this:
Here is an example query to do this:
2. Create a Date table
There are multiple ways to do this. For example, you can create a Calculated Table with the following DAX:
Then right-click on this new
Dim Date
table andMark as date table
, selectDate
as the Date column. Next, selectMonth
column and in the ribbon selectSort by column
and select theMonth#
column.3. Create a relationship
Now create a relationship between your
Dim Date
table to your test results table on the Date columns in each. It should look like:4. Create your chart
Now you will be able to create your chart as show below. Select
Show items with no data
to see consecutive months.