Forum Discussion

sacheu's avatar
sacheu
Microsoft Employee
5 years ago
Solved

How to create a date slicer for 2 data fields

Hi,

 

In my PowerBI page, I have 2 widgets with 2 different tables. Both tables have a column 'date'.

I want to create 1 'data slicer' so that when I change the range of the date, both widgets will get update accordingly.

I create a Date Slicer, and add both 'Date' fields in each table to the 'Add data fields here' under Filter'.

 

But when I test it, only 1 widget get update with the selected range of the date. Can you please tell me how to fix the issue?

 

Thank you.

 

 

8 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI sacheu,

    You can try to extract the date values from two tables to create a calendar, that you can use this as the bridge to link to tables.
    After these steps, you can use bridge calendar to create a slicer and it will apply filter effects to two table records.

    Regards,

    Xiaoxin Sheng

    • sacheu's avatar
      sacheu
      Microsoft Employee

      Thanks. How can I create a calendar from 2 tables?

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi sacheu,

        You can try this calculate table formula if it works on your side:

        New Table =
        VAR _list =
            UNION ( ALL ( Table1[Date] ), ALL ( Table2[Date] ) )
        RETURN
            CALENDAR ( MINX ( _list, [Date] ), MAXX ( _list, [Date] ) )
        

        Regards,

        Xiaoxin Sheng