Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
amalekshahi
Frequent Visitor

Relative Date Slicer - With some predefined date range

I need a date slicer with some predefined values:

  • Today
  • Yesterday
  • This month
  • Last month
  • Last 3 month
  • This year
  • Last year
  • Custom

Upon selecting any of these values, the from and to dates should be automatically set. Can this be done?

 

5 REPLIES 5
v-xicai
Community Support
Community Support

Hi amalekshahi,

 

Put your date on slicer visual , and there is a dropdown arrow on the upper right corner of the visual. You can choose "Relative" . Then when you select the day, month ,year and numbers, the calendar slicer that you want will show.

 

3.png

 

 

 

 

 

 

 

 

 

 

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks @v-xicai  but this is not the solution I was looking for. I am familiar with the relative option in date slicer but it isn't easy to use for beginners.

Hi @amalekshahi ,

 

Could you please share your sample data or desired output screenshots for further analysis? You can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.

 

Best Regards,

Amy

Hi @v-xicai ,

 

I took a screenshot from a CRM application we use. You can find it here.

Basically selecting any option (e.g. last 7 days) will set the from and to dates to current date - 7 days and current date respectively.

Also this filter will be set against the date dimension's date column.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.