Getting data labels in Power BI to look good can often be quite annoying.
The labels on a chart can very often bump into one another or get in the way of reading the actual visualizations which the chart is there to show.
An example of standard data labels:

Note that in order to read the labels, the reader’s eye needs to dart about the chart up and down to compare values and get the whole picture. This is distracting for the reader and most importantly isn’t really story telling with data is it?
There are various ways of dealing with this. Some of the ways include combining data labels together so that data labels from different metrics don’t bump into each other.
There is also moving the data labels or the numbers, so to speak, off the chart altogether and onto a table that is close to the chart. But the main issue with this is that it’s very difficult in Power BI to get the chart and the table to align on either the Y or the X axis, depending on what you’re trying to show.
For example, we can see the chart that I have in the picture. Trying to get a table to line up the months going across the x-axis would be near impossible. Especially if we want to dynamically adjust one or two years or filter on months, etc.
One way of dealing with this, which you can see I have in the attached chart, is to put the numbers below the actual chart area, just above the x-axis, month and year.
Now of course this isn’t a feature that is readily available to set up within the Power BI standard visual, So, we need to use some sneaky work arounds in order to get the labels down there.
It’s not the perfect work-around, that’s for sure. But depending upon the characteristics of your data, it’s not too difficult to set up if we use visual calculations to write the various DAX required.
There are various shortcomings for this. You need to adjust various things on the chart if you want to resize it, especially vertically. And it doesn’t work if your data goes from positive to negative, as the data labels will bump into the chart and just look very unprofessional.
If you’re working with data that you know is only ever going to be positive and generally tends to be within a predictable range, then this solution can actually work and look very tidy indeed.
The basic trick that you need to get this working is to return the maximum of the y-axis. Then add a line which is a negative percentage of that maximum y-axis (for example x -0.15) and then make the line transparent but add custom data labels to it.
We also need to set the maximum and minimum y-axis range, to ensure that everything is visible for the chart within that certain range.
Use it if you will but just be aware of the shortcomings if you’re going to use something like this in a production report.
Link to the pbix file in my Github if you would like to replicate here.

