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
nisha_deepak
Helper III
Helper III

Slicer creation based on policy expiry date

Capture.PNG

 

This is the field i used from data source for creating report.My requirement is i need a slicer which contains values like 30 days,60 days,90 days,120 days.When i select 30 days data will show based on policy_expiry_date which contains date expired within last 30 days compare with current date.Like wise 60 days means date expired within last 60 days compare with current date.Example,current date is (01-11-2020),so when i select 30days from slicer value will show from today to last 30 days.When i select 60 days from slicer data will show from today to last 60 days data.

 

Capture2.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@nisha_deepak - you can use relative date slicer to show the data for last 30,60,90 and so on days, months, years as you like.

NikhilKumar_0-1604238178461.png

 

View solution in original post

3 REPLIES 3
Fowmy
Super User
Super User

@nisha_deepak 

Create a Slicer Table as follows, you can add more rows as necessary and name it Period

 

Fowmy_0-1604238281178.png
Create the following Measure:

ExpiryFlag = 

var _Period = SELECTEDVALUE(Period[Days]) 
var _ExpiryDate = SELECTEDVALUE('DataTable'[Date])
return 

IF( _ExpiryDate >= (TODAY() - _Period) && _ExpiryDate < TODAY() , 1 , 0)  

 

Assing to the Table visual where you want to see the Expiry dates filter by selected Period Range

Fowmy_1-1604238512669.png

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

 




 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

  • Hi @Fowmy  can you share the pbix file it could be helpful to me
Anonymous
Not applicable

@nisha_deepak - you can use relative date slicer to show the data for last 30,60,90 and so on days, months, years as you like.

NikhilKumar_0-1604238178461.png

 

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.