Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

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!

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi  Anonymous 

     

    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:

    Then add a calculate column:

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

    The result is as follow:

     

    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.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Anonymous 

     

    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:

    Then add a calculate column:

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

    The result is as follow:

     

    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.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you Anonymous!

      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?