Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

date slicer setup

<p> I have a date table and another Project data table with Planned start and Planned Finish. How to connect these two tables..so that if i put a slicer for date table, it picks and filters correct data. Currently its not filtering all datas.

</P>

Sl.NoProject NamePlanned StartPlanned Finish
1a18/07/202219/08/2022
2b20/08/202220/09/2022
3c20/08/202220/09/2022
4d21/09/202221/10/2022

7 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI Anonymous 

    How does your current relationship between table looks like?

    • Anonymous's avatar
      Anonymous
      Not applicable

      I have added a column tag=1 in date table and as well in Project data table. Set relationship as Many - Many

      Date(tag)=Projectdata(Tag)

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 

    That is a cross join and you will have all rows from second table for each row in the first table and Vice-versa.

    The join needs to be on the date column. 

    • Anonymous's avatar
      Anonymous
      Not applicable

      I didnt understand the solution . Could you please help to understand more clearly. Thanks

  • v-easonf-msft's avatar
    v-easonf-msft
    Community Support

    Hi, Anonymous 

    If you have a seperate calendar table ,you can create a measure and apply it to table filter pane to filter data.

    visual filter = 
    VAR _selecteddate =
        MAX ( 'Calendar'[Date] )
    RETURN
        IF (
            ISFILTERED ( 'Calendar'[Date] ),
            IF (
                _selecteddate >= MAX ( 'Table'[Planned Start] )
                    && _selecteddate <= MAX ( 'Table'[Planned Finish] ),
                1,
                0
            ),
            1
        )

     

    Best Regards,
    Community Support Team _ Eason

    • Anonymous's avatar
      Anonymous
      Not applicable

      if date filter is a list..its filtering the data. But when the date filter is changed to hierarchy like QTR , month..its not filtering all datas

    • Anonymous's avatar
      Anonymous
      Not applicable

      and also its not working on Cards visual