Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I'm trying to build a bar chart with a four-level hierarchical Y-axis, however it does seem possible to format the labels in a way in which they are usable. The default behavior results in this, which is pretty unusable:
I would like to not show repeated items and have a little space beteen labels so they don't run together, ideally somthing like this:
Is there any way to do this?
Solved! Go to Solution.
Hi @Mendel ,
I have a workaround:
First create an index column in query editor;
Then create 3 columns as below:
_Axis 1 =
var _pre=CALCULATE(MAX('Table'[Axis 1]),FILTER('Table','Table'[Index]<EARLIER('Table'[Index])))
Return
IF('Table'[Axis 1]=_pre,"",'Table'[Axis 1])
_Axis 2 =
var _pre=CALCULATE(MAX('Table'[Axis 2]),FILTER('Table','Table'[Index]<EARLIER('Table'[Index])))
Return
IF('Table'[Axis 2]=_pre,"",'Table'[Axis 2])
_Axis 3 =
var _pre=CALCULATE(MAX('Table'[Axis 3]),FILTER('Table','Table'[Index]<EARLIER('Table'[Index])))
Return
IF('Table'[Axis 3]=_pre,"",'Table'[Axis 3])
And you will see:
Then select column "Great-Grandchild(Axis 4)">sort by "Index";
Remember to first put Axis 4 as the Axis in bar chart,then add the other 3 Axis,as it will keep the order of Axis 4.
Finally you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Hi @Mendel ,
I have a workaround:
First create an index column in query editor;
Then create 3 columns as below:
_Axis 1 =
var _pre=CALCULATE(MAX('Table'[Axis 1]),FILTER('Table','Table'[Index]<EARLIER('Table'[Index])))
Return
IF('Table'[Axis 1]=_pre,"",'Table'[Axis 1])
_Axis 2 =
var _pre=CALCULATE(MAX('Table'[Axis 2]),FILTER('Table','Table'[Index]<EARLIER('Table'[Index])))
Return
IF('Table'[Axis 2]=_pre,"",'Table'[Axis 2])
_Axis 3 =
var _pre=CALCULATE(MAX('Table'[Axis 3]),FILTER('Table','Table'[Index]<EARLIER('Table'[Index])))
Return
IF('Table'[Axis 3]=_pre,"",'Table'[Axis 3])
And you will see:
Then select column "Great-Grandchild(Axis 4)">sort by "Index";
Remember to first put Axis 4 as the Axis in bar chart,then add the other 3 Axis,as it will keep the order of Axis 4.
Finally you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Hey @Mendel ,
at the current moment this feature is not support for the default bar charts like Stacked or Clustered bar chart. You just can achieve this by using one of the column charts, like in the picture below:
Maybe, this will work for you as well.
Regards,
Tom
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |