Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Filter table based on slicer (dropdown)

I have the following table in my PowerBI report page, and I have another table with a single column of random dates (I have added this to the page filter and as a slicer dropdown). So if i select a couple of days in that dropdown, i want my table to automatically filter the records of those days alone. Can you please help me with this?
 
So for example, if i select 09/02/2022 and 21/09/2022 from the following drop down filter, i want my powerBI table to automatically show only these selected records. (They are not the same columns, so i cannot just use the date in the table to build the dropdown)

 

Thanks in advance!

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous ,

     

    You can create a relationship between two tables, and then if you filter the selected date, dates from another table will be filtered too.

    Create and manage relationships in Power BI Desktop - Power BI | Microsoft Learn

                                                                                                                                                             

    Best Regards,

    Stephen Tao

     

    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 ,

     

    You can create a relationship between two tables, and then if you filter the selected date, dates from another table will be filtered too.

    Create and manage relationships in Power BI Desktop - Power BI | Microsoft Learn

                                                                                                                                                             

    Best Regards,

    Stephen Tao

     

    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

      Thanks for your response. This solution works. But I do have an additional question.
      Is it possible for me to filter a range of dates based on the "selected date"

      If selected date is 02/02/2023, i want the table to show data between 02/01/2023-01/02/2023.
      i.e. One month worth of data, prior to the selected date.

      Thanks