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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
koorosh
Post Partisan
Post Partisan

Dynamic slicer

Hi, I have a table that includes date column. I want to filter the table based on the following criteria. How can I make a slicer including them?

 

 1- Date difference with today is more than 90 days.

2- Date difference with today is more than 180 days.

3- Date difference with today is more than 365 days.

4-Date difference with today is more than 730 days.

5 REPLIES 5
koorosh
Post Partisan
Post Partisan

I am looking to define 4 variables that each one filters the table based on differenc days. Then put these variables in a slicer.

Idrissshatila
Super User
Super User

Hello @koorosh ,

 

so first of all you have to create a datediff column between the date column and today.

 

the next step is to create a new column based on the date diff column where you categorize the result in which if the value is >= 90 && values < 180 then "90 Days" else if ...... and you continue to specify the others.

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Hi, thank you.But I do not want to make the group by more than 90 less than 180. I want to filter the table with more than 90 days difference once. Another attempt, filter with more than 180 days difference. Third option filter with more than 365 days difference. Fourth attempt fitlter with more than 730 days difference.

So the slicer should have four options.

@koorosh ,

I am not sure whether I understand your requirement right or not, but below is what I tried based on my understanding?

 

New Date Table = 
VAR _dateTable = DIM_DATE
VAR _today = TODAY()
RETURN UNION(
    ADDCOLUMNS(FILTER(_dateTable,[Date]>_today-90),"Period","Last 90 Days","Order",1),
    ADDCOLUMNS(FILTER(_dateTable,[Date]>_today-180),"Period","Last 180 Days","Order",2),
    ADDCOLUMNS(FILTER(_dateTable,[Date]>_today-365),"Period","Last 365 Days","Order",3),
    ADDCOLUMNS(FILTER(_dateTable,[Date]>_today-730),"Period","Last 730 Days","Order",4)
    )

 

Thanks,

Arul





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


Thanks, I am looking for a slicer like the attached file.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors