Power BI: Show and Sort Slicer By Month or Quarter Name
Introduction
In this article, we will show **How to display and sort a Slicer control by Month or Quarter Name in Power BI? **
You might also like to read Install and Configure Power BI Report Server Step by Step
Scenario
In PowerBI, when you try to use the slicer to filter by a date field, it shows the year of this date field by default.
Unfortunately, there is no an OOTB setting to change the slicer behavior to display it as Month or Quarter Name directly instead of Year.
Steps
Display the Slicer By Month Name
In this section, we will show How to show the slicer by Month Name by doing the following:
- At Home tab, specifically in Calculation Group, Click on New Measure > New Column.
- Set the column name to "MonthName" or as you prefer.
- Type the column formula, by typing the date field name followed by dot then select "Month".
- In Visualization Pane, Drag and drop, a Slicer, and make sure it selected.
- In Field section, drag the newly created column "MonthName" to the Field section in the Visualization Pane.
- The slicer should be now shown by Month Name instead of Year.
Sort the Slicer By Month Name
Although the Slicer is displayed by Month name, it's not sorted properly!
To sort a slicer by Month Name, you should do the following:
- At Home tab, specifically in Calculation Group, Click on New Measure > New Column.
- Set the column name to "MonthNumber" or as you prefer.
- Type the column formula, by typing the date field name followed by dot then select "MonthNo".
- In Fields Pane, click on the "MonthName" Column to be selected.
- From the above ribbon, at Modeling tab, Click on "Sort By Column" and select the newly created column "MonthNumber".
- The slicer should be now shown by Month Name and sorted properly.
Display and Sort a Slicer By Quarter Name
**In this section, we will show How to display and sort a Slicer By "Quarter Name", it's the same above steps but we will change Month to Quarter. **
- At Home tab, specifically in Calculation Group, Click on New Measure > New Column.
- Set the column name to "QuarterName" or as you prefer.
- Type the column formula, by typing the date field name followed by dot then select "Quarter".
- In Visualization Pane, Drag and drop, a Slicer, and make sure it selected.
- In Field section, drag the newly created column "QuarterName" to the Field section in the Visualization Pane.
- The slicer should be now shown by Quarter Name instead of Year.
By the way, no need to create an additional column for "Quarter Number". The Quarter Name column by default sorted properly.
Conclusion
In this article, we have explained How to display and sort a Slicer control by Month or Quarter Name in Power BI?
**
**
Reference
Download
- Download the PBIX file at GitHub and don't forget to follow me to get the latest new Power BI samples.