Forum Discussion

Vikram400's avatar
Vikram400
Regular Visitor
4 years ago

How to create Cconditional slicer using 3 date columns.

Hi, 

I'm trying to create the conditional date slicer, There are 3 date columns in a table namely Date1,  Date2,  Date3 along with few other columns. We need to create the date slicer which should satisfy the below 3 conditions and the whole report should react accordingly

Conditions:

1. Selected value in slicer is greater than > Date column 1

2. Selected value in slicer is less than < Date column 2

3. Selected value in slicer is in between 4 to 10 years date range for column 3.

 

All the 3 conditions should be applied to the whole report upon selecting the Date from slicer... 

 

Thanks in Advance. 

3 Replies

  • The best you can do is page level measure filters.  It is not possible to have that on report level.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Vikram400 ,

    I created some data:

    Here are the steps you can follow:

    1. Create calculated table.

    Table 2 =
    CALENDAR(
        DATE(2021,1,1),
        DATE(2022,12,31))

    2. Create measure.

    Flag =
    var _select=
    SELECTEDVALUE('Table 2'[Date])
    return
    IF(
        MAX('Table'[Date column1])<=_select&&
        MAX('Table'[Date column2])>=_select&&
        AND(
        MAX('Table'[Date column3])>=4,
        MAX('Table'[Date column3])<=10),1,0)

    3. Place [Flag]in Filters, set is=1, apply filter.

    4. Result:

    If you need pbix, please click here.

    If I have misunderstood your meaning, please provide your desired output and your pbix without privacy information.

     

    Best Regards,

    Liu Yang

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

    • Vikram400's avatar
      Vikram400
      Regular Visitor

      Thank you Anonymous , I received almost half of the answer and i required few changes in that, 
      1. The slicer should be shown as Year - Months
      2. We have 3 date tables and you successfully gave answer for 2 conditions and need to include the 3rd condition also.( It should show last 4 to 10 years from 3rd date table)


      Thank you.