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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
kmilarov
Helper II
Helper II

Modified time period slicer

Hi Guys,

Please help to find a solution :

I wnat to have a slicer fro Relative Date --> Next xxx (whatever period) but to include and ALL last/previous dates til now.

For example, to select NEXT 1 month --> and the filter result to be all past dates till today plus all next 1 month.

 

Thanks

K

1 ACCEPTED SOLUTION
v-kongfanf-msft
Community Support
Community Support

Hi @kmilarov ,

 

What I mean by modifying the slicer is this: create a custom form to use as a slicer.

vkongfanfmsft_1-1708916446366.png

 

You can put the created metric result in filters, filtering for values of 1. visual will display the results that fulfill the condition.

vkongfanfmsft_0-1708916428323.png

Best Regards,
Adamk Kong

 

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

 

View solution in original post

4 REPLIES 4
v-kongfanf-msft
Community Support
Community Support

Hi @kmilarov ,

 

What I mean by modifying the slicer is this: create a custom form to use as a slicer.

vkongfanfmsft_1-1708916446366.png

 

You can put the created metric result in filters, filtering for values of 1. visual will display the results that fulfill the condition.

vkongfanfmsft_0-1708916428323.png

Best Regards,
Adamk Kong

 

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

 

v-kongfanf-msft
Community Support
Community Support

Hi @kmilarov ,

 

If relative dates are not switched very often, try customizing the table of relative dates. Refer to the following:

vkongfanfmsft_1-1708657337044.png

 

result_ =
SWITCH (
    SELECTEDVALUE ( Slicer[slicer] ),
    "next 1 month",
        IF ( MAX ( 'Date'[Date] ) < TODAY () + 30, 1, 0 ),
    "next 1 week",
        IF ( MAX ( 'Date'[Date] ) < TODAY () + 7, 1, 0 ),
    "next 1 year",
        IF ( MAX ( 'Date'[Date] ) < TODAY () + 365, 1, 0 )
)

vkongfanfmsft_0-1708657288111.png

 

Best Regards,
Adamk Kong

 

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

 

Thank you ! Please could you clarify where/ how exactly to revise the slicer ? Shall I create new Parameter --  slicer ? Where to put the fax code " results_ etc "?

 

lbendlin
Super User
Super User

Is your calendar table in import mode, and refreshed frequently?  Then you can add a calcuated column with a flag for your desired range ("all dates that are smaller than EDATE(TODAY(),1)"  and use that as a filter.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.