Forum Discussion
baBI123
8 years agoHelper II
GROUP INTO MONTH
Hello POWER BI family, I have a question: How can I group this chart (see attachment) so that the values on the x-axis are grouped by month?? Thanks in advance
- Anonymous8 years ago
baBI123,
If you create relationship between the SHOP WO TAT table and a calendar table using date field, drag the date field of the calendar table to X-axis of your chart, then you are able to get date hierachy and remove Year & Quarter & Day as mehaboob557' s post.
Another method is to create a MonthName field in your SHOP WO TAT table using DAX below, then drag the MonthName field to X-Axis of your chart.MonthName = SWITCH(MONTH('SHOP WO TAT'[Entry Date]),1,"January",2, "February",3,"March",4,"April", 5,"May",6,"June",7,"July",8,"August",9,"September",10,"October",11,"November",12,"December")
Regards,
Lydia
Anonymous
6 years agoNot applicable
Not sure if this has changed since this post, but for those looking, the correct way to do it now is:
- Go to the visulisation field where the date will be listed under the "Shared axis"
- Click on the arrow on the right, then change from the name of your field (will be ticked) to "Date Hierarchy"
- You should now have the options of year etc under your field, in this example I will label as year and month. Day can stay as its lower in the hierarchy, but get rid of Quater or it will get in the way, so click the x to remove it.
- You will now see it sorted by year, to get it to month right click on the chart (anywhere on the chart that is blank) and choose "Expand to next level"
You should now have your chart with year and month. Of course if its only one year you can remove the year where we removed the quater etc. Hope this helps anyone in future.