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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
skatofia
New Member

Slicer to 2 Date Ranges

Hi,

I was wondering if there is a way to default a report/workbook to the earliest date and have only that date selected at first, but then allow the user to select all dates in the dataset or certain others? If not, is there a way to create a slicer that has 2 components, 1 component is to filter on just the earliest date and the other component of the slicer is to filter on all dates (including the earliest date)? I do have a date field in my underlying data and I also have that date field as just a regular list slicer, but I'd like to do more based on what I just wrote.

 

Thanks!

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

Hi  @skatofia 

 

Unfortunately that power bi doesn't support this feature currently.

But maybe this can be an alternative workaround:

First of all, I create a set of sample:

vzhengdxumsft_0-1713490512809.png

Then add a calculate column:

Column =
IF (
    'Table'[date] = MIN ( 'Table'[date] ),
    "the earliest date",
    FORMAT ( 'Table'[date], "yyyy-mm-dd" )
)

vzhengdxumsft_1-1713490715970.png

The result is as follow:

vzhengdxumsft_3-1713490765990.png

 

Best Regards

Zhengdong Xu
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

2 REPLIES 2
v-zhengdxu-msft
Community Support
Community Support

Hi  @skatofia 

 

Unfortunately that power bi doesn't support this feature currently.

But maybe this can be an alternative workaround:

First of all, I create a set of sample:

vzhengdxumsft_0-1713490512809.png

Then add a calculate column:

Column =
IF (
    'Table'[date] = MIN ( 'Table'[date] ),
    "the earliest date",
    FORMAT ( 'Table'[date], "yyyy-mm-dd" )
)

vzhengdxumsft_1-1713490715970.png

The result is as follow:

vzhengdxumsft_3-1713490765990.png

 

Best Regards

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

Thank you @v-zhengdxu-msft!

Are there any other solutions besides this one that can separate Earliest date and also have a slicer inclusive of earliest date and all dates?

In addition to that, is it possible to add the earliest date to the "Earliest Date" text you have in your solution above^? Can I also make it so the earliest date shows up as the first filter selection option too?

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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