Show and Sort Slicer By Month or Quarter Name in Power BI

In this article, we will show

How to display and sort a Slicer control by Month or Quarter Name in Power BI? 

A slicer is a powerful alternative way to filter the dataset shown on the page.


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.

Slicer By Year in Bower BI

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.

Slicer By Month in Bower BI


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.

Sort Slicer By Month in Bower BI


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.

By the way, no need to create an additional column for “Quarter Number” the Quarter Name column by default sorted properly.

  • 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.

Show Slicer By Quarter in Bower BI.gif


Conclusion

In this article, we have explained How to display and sort a Slicer control by Month or Quarter Name in Power BI? 

Slicer By Month and Quarter in Bower BI

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s