In this blog I will show you how you can set format for hierarchical axis labels on chart in good way, also we will see how concatenate labels property will help us to achieve this
Issue with multi-Axis/ Hierarchical axis.
In below Image there are 3 level of hierarchy in Axis, and they are – year, quarter & month.
You can see in below Image, the chart is showing concatenation of year & quarter month in X-axis level. It’s look like disorderly and not easy to read.
Follow these steps to create a multi-Axis:
Step-1: Import any dataset. After load data into Power BI file, check the datatype for Date column, if datatype is not in date format, then change it as in date.
Step-2: Add one stacked column chart, add drag columns as mentioned below-
Axis: Date
Legend: Country
Values: Sales
By default, it will display first level of hierarchy data on chart in X-axis. After that click on “Expend all down.” icon (Green highlighted icon) to display one more level of hierarchy on chart. Similarly click to the last level of the hierarchy.
Step-3: Now all three levels of hierarchies are visible in x-axis.
Step-4: Now sort the chart data by year, quarter & month. click on ellipses and then select Sort axis >Year Quarter Month and Make sure sort order should be ascending.
Step-5: Now turn off concatenate labels- Go to format pane from X axis and turn off concatenate labels.
Step-6: To view the hierarchy more clearly, change the Gridlines of the X-axis to solid.
Now you can see in above Image, its looks good and easy to read.
Rahul Prajapati
Data Analyst
Addend Analytics