Here are ways to reduce or eliminate indentation and aligning issues on the Matrix visual within Power BI. Several things cause indentation and alignment issues: inconsistent format, width difference across borders, and sometimes data structure problems. Some practices and fixes help in ensuring the correct alignment of texts.
1. Better Indentation by Stepped Layout
Go to Format Pane > Row Headers, and turn Stepped Layout On or Off to choose the desired structure. If you want hierarchical indentation, it is advised to keep Stepped Layout On.
2. Readjust Column Width Manually
Auto-resizing does not work wonders on Power BI; through manual adjustment, drag the column edge. Auto-size Column Width must be set to Off under Format Pane > Column Headers.
3. DAX for Indentation Customization
If the hierarchy is not indenting, use DAX to create a formatted text column with some spaces or special characters:
IndentedColumn = REPT(" ", Table[Level] * 4) & Table[Category]
To enter higher count hierarchy levels into the calculated column.
4. Ensure consistent formatting of your data.
Mismatched text alignment can occur due to mixing up types of data (for example, numbers stored in text format). To make sure spacing does not turn out to be unexpected, convert all fields to a uniform format (text or numbers).
5. Use custom conditional formatting.
Factors > Conditional Formatting > Alignment will let you control how text is aligned within the cell.