Power BI Date Slicer By Month [How to Use]

In this Power BI tutorial, We will discuss how to use the Power BI Date slicer by month and how to work with the Power BI Date slicer by month and year.

Additionally, We will cover the topics below:

  • Power BI Date slicer date hierarchy month
  • Power BI Date slicer last 12 months
  • Power BI Date slicer default to the current month

Power BI date slicer by month

Let us see how we can filter the value presented in the power bi report based on the date slicer by month in Power Bi.

In this example, we are going to use the sales table data, to filter data based on the date slicer visual by month in Power Bi.

  • Open the Power Bi desktop and load data using the get data option.
  • Once the data has been loaded, Select the slicer icon presented in the visualization pane, and in the slicer visual, drag and drop the Order Date field and choose the month option.
  • In the same way, select the stacked column chart and drag and drop the sales and Product name fields from the field pane as below:
power bi date slicer by month
power bi date slicer by month

Now select any of the months from the date slicer by month. Based on the filtered month it displays the Products in the stacked bar chart.

power bi date slicer by month example
power bi date slicer by month example

In the same way, if we select any other month it displays the sales value along with the product name for the selected month.

Example of power bi date slicer by month
Example of power bi date slicer by month

This is how to filter the value presented in the power bi report based on the date slicer by month in Power Bi.

See also  Power BI Access to the Resource is Forbidden [Solved]

Power BI date slicer by month year

Here we will see how we can filter the value presented in the power bi report based on the date slicer by month and year in Power Bi.

  • Open the Power Bi desktop and load data using the get data option.
  • Once the data has been loaded, Select the slicer icon presented in the visualization pane, and in the slicer visual, drag and drop the Order Date field and choose the month and year options.
  • In the same way, select the stacked column chart and drag and drop the sales and Product name fields from the field pane as below:
power bi date slicer by month year example
power bi date slicer by month year example

Now choose any of the Years and Months from the date slicer by month and year. Based on the filtered month and year it displays the Products and sales value in the stacked bar chart.

power bi date slicer by month year
power bi date slicer by month year

In the same way, if we select any other month and year it displays the sales value along with the product name for the selected year and month.

Example of power bi date slicer by month year
Example of power bi date slicer by month year

This is how to filter the value presented in the power bi report based on the date slicer by month and year in Power Bi.

Check Out: How to Add a Slicer in Power BI

Power BI date slicer date hierarchy month

Let us see how we can add a date slicer with a date hierarchy month in Power Bi,

Date Slicer hierarchy displays the order date field in the Year, Quarter, Month, and Day. From the date slicer, we can select the date slicer date hierarchy month.

  • Open the Power Bi desktop and load data using the get data option. Once the data has been loaded, Select the slicer icon presented in the visualization pane, and in the slicer visual, drag and drop the Order Date field.
  • In the same way, select the clustered column chart and drag and drop the sales and Product name fields from the field pane as below:
Power bi date slicer date hierarchy month
Power bi date slicer date hierarchy month

Now select any month from the date hierarchy month slicer and it filters to display the data in the clustered column chart.

Power bi date slicer date hierarchy month example
Power bi date slicer date hierarchy month example

This is how to add a date slicer with a date hierarchy month in the Power Bi report.

See also  This content isn't available. Learn more about Power BI [Solved]

Read: How to Add a Dropdown Slicer in Power BI

Power BI date slicer last 12 months

Here we will see how we can display the last 12 months of data in the Power Bi report using the date slicer in Power Bi,

Using the Date slicer it is not possible to display the value for the selected months, but using the Power Bi Dax measure we can filter the value for the last 12 months.

  • Open the Power Bi desktop and load data using the get data option. Once the data has been loaded.
  • Select the New measure option under the home tab and apply the below-mentioned formula:
Last 12 months = MAX ( Sales_Table[Order Date] ) -12

Where,

  1. Last 12 months = Measure Name
  2. MAX = Function Name
  3. Sales_Table = Table Name
  4. Order Date = Column Name
  • Now from the visualization, select the clustered column chart and drag and drop the sales and product names field values from the field pane.
  • And also drag and drop the created measure value so that it will display the data for the last 12 months in the clustered column chart.
power bi date slicer last 12 months
power bi date slicer last 12 months

This is how to display the last 12 months of data in the Power Bi report using the date slicer in Power Bi.

Check also: Set the default value in Power Bi Slicer

Power BI date slicer default to the current month

Let us see how we can set the date slicer default to the current month using the power bi date slicer in Power Bi.

  • On the Power Bi report page, go to the Home tab > Transform Data. Then it will redirect to the Power query editor page, under the Add column > Custom column.
  • A custom column page will appear, here we have to put the formula like this:
= Date.MonthName( DateTime.LocalNow() )
Power BI date slicer default to the current month
Power BI date slicer default to the current month
  • Click on the Home tab > select Close & Apply. It will return to the Power Bi Report page with updated data.
  • Now in the report section, select the slicer and drag and drop the date field and the created custom column field (ie: Current Month is February)from the field pane as below:
Power BI date slicer default to the current month example
Power BI date slicer default to the current month’s example
  • Select any of the date under the current month to filter the value presented in the Power Bi report.
  • In the below screenshot, you can see that based on the selection in the date slicer displays the sales data value.
Example of Power BI date slicer default to the current month
Example of Power BI date slicer default to the current month

This is how to set the date slicer default to the current month using the power bi date slicer in Power Bi.

See also  Create a Power BI Pie Chart | Power BI Pie Chart Multiple Values

This Power Bi tutorial explained how to use the Power Bi date slicer by month and also we understood the date slicer by month and year in Power Bi. We also discussed the date slicer with the date hierarchy month in Power Bi. Also covered below are headings:

  • Power BI date slicer last 12 months
  • Power BI date slicer default to the current month

Additionally, you may like:

>