In this Power BI Tutorial, We will discuss the Relative Date Slicer and Date Filter in Power BI Desktop. By taking a simple example, I will show you how we can use the relative date slicer and date filter in PowerBI Desktop.
Power BI relative date slicer
Here my Requirement is, I have a SharePoint Online List and this list is having so many items. From those items, I want to retrieve the last seven days of data records.
As per my requirement, I have to retrieve the last seven days of data records. But also, You can retrieve last any days of the data records, next days of data records or today’s data records.
For that purpose, I have created a SharePoint Online List named Product Details. This list is having four columns as:
- Product Name (Title): This is the by default Title column. Just I have renamed it to Product Name.
- Product Quantity: This column is the Number data type that I have created.
- Product Bill Date: This column is the Date/Time data type.
- Product Sales: This column is the Currency data type.
Also, I have entered a number of items to the Product Details List as like the below screenshot.
To visualize the data record of the SharePoint Online List, Select the Product Sales field value from the Fields section and select any chart for data visualization. Here in this example, I have taken a Stacked column chart from the Visualizations section.
Once you will add the field value in the chart, then the data chart will appear like the below screenshot.
Now in Power BI Report, We have to add the Date filter to retrieve the last seven days of the data record.
To add the Date Filter in Power BI Report, Choose Slicer from the Visualizations section and put the Product Bill Date field value in the Field. Once you will choose the slicer, then the chart will display as shown below.
NOTE:You must ensure that your Date/Time field should be like this below format:
“mm/dd/yyyy“. So that the Relative Sicer Filter will appear otherwise not.
Now to filter the data, click on the drop-down option which is present on the top of the slicer. Select Relative from the drop-down.
After selecting Relative, the Product Bill Date will appear as like below. Here, you can choose either Last, Next or This day from the drop-down option. Suppose, If you want the last 15 days record, So you can choose the Last option from the drop-down.
Secondly, Enter the number that you want to view the data record. Suppose, You want 15 days record, So you can put 15 over there.
And the Last thing you should know what type of date you want to view the data records. Suppose, You want to 15 days, So you can choose Days from the drop-down.
As per my requirement, I want the last 7 days data record, That’s why I have entered 7. Now you can see in the below screenshot, the other chart is displaying the total Product sales of the last 7 days.
At last, I have provided all the styles to the data visualization chart by using the Format section. As I have formatted styles like Font size, background color, font color, border, etc. Now my Report is looking like below screenshot.
You may like the below Power BI articles:
- Getting started with Microsoft Power BI Tool
- Add Title, Image, and Video to Power BI Dashboard
- Create a Power BI Dashboard and Add Reports to Power BI Dashboard
- PowerBI Report Filter using Slicer Visualization
- Power BI: Create a various report from SharePoint Online list
- Access to the resource is forbidden error in Power BI
- Create a Power BI report from Excel using Power BI Desktop
- [Video Tutorial] Create Power BI Dashboard step by step tutorial
Hence in this Power BI Tutorial, We discussed the Relative Date Slicer and Filter in Power BI Desktop. By taking a simple example, I have shown you how to use the relative date slier and filter in Power BI Desktop.
Hello Everyone!! I am Bhawana a SharePoint MVP and having about 10+ years of SharePoint experience as well as in .Net technologies. I have worked in all the versions of SharePoint from wss to Office 365. I have good exposure in Customization and Migration using Nintex, Metalogix tools. Now exploring more in SharePoint 2016 🙂 Hope here I can contribute and share my knowledge to the fullest. As I believe “There is no wealth like knowledge and no poverty like ignorance”