Forum Discussion
spacing between display units and values
Can someone guide me how to add spacing between data value and unit (spance between numbers and billion)
Also, can I reduce the space between Y axis title and bar chart. I can add a text box but the text orientation is not vertically aligned.
Thanks for your help
1 Reply
- 123abc
Community Champion
Adding spacing between data values and units, as well as reducing the space between the Y-axis title and a bar chart, can be done in Power BI. Here's how you can achieve both of these:
Adding Spacing Between Data Values and Units:
Format the Data Label:
- Select the visual (e.g., bar chart) for which you want to format the data labels.
- In the "Visualizations" pane, go to the "Format" section (paint roller icon).
- Expand the "Data labels" section.
- Toggle on the "Data label" switch to enable data labels if they are not already enabled.
Customize Data Label Format:
- In the "Data labels" section, you can use the "Display unit" dropdown to select the desired unit (e.g., Thousands, Millions, Billions) to format your data.
- You can also use the "Decimal places" dropdown to control the number of decimal places displayed.
Add Custom Suffix:
- To add custom spacing or text between the data value and unit, you can use the "Custom unit label" option.
- Enter your desired text or space in the "Custom unit label" field. For example, you can enter a space character or any other text you prefer.
Reducing Space Between Y-Axis Title and Bar Chart:
To reduce the space between the Y-axis title and a bar chart, you can adjust the formatting options:
Format Y-Axis Title:
- Select the visual (e.g., bar chart) for which you want to format the Y-axis title.
- In the "Visualizations" pane, go to the "Format" section.
- Expand the "Y-axis" section.
Adjust Margins:
- Within the "Y-axis" section, you should find options to adjust the "Margin" or "Title margin."
- Reduce the margin value to bring the Y-axis title closer to the chart.
Text Box (Alternative):
- If you need further control over text alignment and spacing, you can add a separate text box to your report.
- Go to "Insert" > "Text box" and create a text box with your desired Y-axis title.
- You can adjust the position, alignment, and formatting of the text box as needed.
Unfortunately, Power BI's built-in formatting options may not provide fine-grained control over vertical text alignment within a chart element. For more precise control over text alignment, you may need to use a text box as mentioned above.