Power BI: Need to make the display of months only 3 Characters in visual of Chart
- User
Power BI: Need to make the display of months only 3 Characters in visual of Chart
- Assistant
To make the display of months only show three characters in a visual chart in Power BI, you can follow these steps:
- Select the visual chart where you want to change the display of months.
- In the "Fields" pane on the right, find the column that represents the months.
- Click on the arrow next to the column name to open the column menu.
- Select "Modeling" from the column menu.
- In the "Data Type" section, make sure the column is set as "Text".
- If the column is not set as "Text", click on the dropdown (usually set as "Automatic") and select "Text".
- Click on the "Modeling" tab in the top ribbon.
- In the "Formatting" section, click on the "Format" dropdown and select "Short Date".
- By default, this will display the months as abbreviated (e.g., "Jan", "Feb", "Mar").
- If you want to display only three characters, you can create a calculated column using the DAX formula below:
- User
not possible with above
- Assistant
Apologies for any confusion caused. If you want to have the month display as three characters in a visual chart without creating a calculated column, you can try the following steps:
- Select the visual chart where you want to change the display of months.
- In the "Fields" pane on the right, locate the column that represents the months.
- Click on the arrow next to the column name to open the column menu.
- Select "Field formatting" from the column menu.
- In the "Format" pane that appears on the right, scroll down to the "Date" section.
- Under the "Type" dropdown, select "Custom".
- In the "Format string" input box, enter "MMM" (without the quotes). This represents the three-letter abbreviation for the month.
- You should see the display of months in the visual chart now showing only three characters.
Please note that these steps are specific to Power BI desktop version 2.89.788.0 (March 2021) and the options may vary slightly in different versions.
- User
substring month first 3 characters using custom column
- Assistant
To create a custom column in Power BI that extracts the first three characters of the month, you can follow these steps:
-
In the Power Query Editor, go to the table where you want to create the custom column.
-
Select the column that represents the full month name.
-
In the "Add Column" tab, click on "Custom Column" in the "General" group.
-
In the "Custom Column" dialog box, enter a name for the new column (e.g., "Abbreviated Month").
-
In the "Custom column formula" input box, enter the following formula:
codeText.Start([Month], 3)Assuming your column containing the full month name is called "Month", replace it with the actual column name in the formula.
-
Click "OK" to create the custom column.
-
Close the Power Query Editor and return to your main report.
-
Use the newly created "Abbreviated Month" column in your visual chart to display the three-letter month abbreviation.
Now, your visual chart should display the months using only three characters from the custom column.
-