Forum Discussion
Stacked Area Chart - Convert to Monthly
- 2 years ago
Oh, I missed to tell you to add the Month column as well. You can add it as a new column in your date table with a formula like this:
Month_Name = FORMAT(Table[Date], "MMMM")
You need to have a calendar/date table.
First, you need a date column in that table. You can extract it through Power Query by selecting the time column, going to Add Column and selecting the date option:
Then, you can close & apply and create a new table with DAX (go to Table view to find the option easily) and use the command CALENDARAUTO() to generate an automatic calendar table.
After that, create a relationship between the date column from the new table and the date column (recently added) from your current table.
Finally, on your axis use the month column from the new table as the field.
Hi - thanks for your help.
Just had a couple of follow up questions:
- When adding the date column to the existing data should this be 'Date Only'?
I followed the steps and I'm able to create the relationship however I dont have a month column to choose from? If I add a Month column, rather than 'Date Only', I only get months 1 - 12 however I need to be able to have a distinction between Month 1 2016 vs Month 1 2017/18/19 etc.
I have the below option which I added to Axis for my visual, however this is still daily data