Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Garett52
Frequent Visitor

2 Tables - show multiple options from one selection

Hi 

 

I have the following two tables: 

 

Table1

DLY                                         ID                      DLY_REASON                         DLY_MIN

2/3/2019 5:14:09AM              125631                 LATE                                       10

2/10/2019 7:57:63PM            125638                 SLOW                                      8

2/25/2019 2:14:09AM            127531                 LATE                                        5

2/28/2019 5:14:09AM            129852                 LATE                                        7

 

Table2

ID              CD               TAKEN                               ARRIVAL                               TURNAROUND

125631       A                2/3/2019 4:58:09AM         2/3/2019 5:01:09AM                   3

125631       B                2/3/2019 5:10:00AM         2/3/2019 5:15:00AM                   5

125631       C                2/3/2019 5:19:09AM         2/3/2019 5:26:09AM                   7

125632       A                2/3/2019 5:40:11AM         2/3/2019 5:44:11AM                   4

125632       B                2/3/2019 5:52:41AM         2/3/2019 5:55:41AM                   3

 

Both of these are in PowerBI as tables with a realtionship between the ID's. If I select an ID in Table1, then all instances of that ID show in Table2. How can I have Table2 show me all the instances of my selection plus the ID after it?

 

EX:  I I select the first line in Table1, I would want Table2 to show 125631 and 125632

 

Thanks

 

 

 

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @Garett52 ,

 

You need an extra table to list all unique IDs which will be added to slicer later, this table should be unrelated to both Table1 and Table2.

Slicer Item = DISTINCT(TB1[ID])
1.PNG
 
Add below measure to visual level filter.
Measure =
IF (
    ISFILTERED ( 'Slicer Item'[ID] ),
    IF (
        SELECTEDVALUE ( TB2[ID] )
            IN { SELECTEDVALUE ( 'Slicer Item'[ID] ), SELECTEDVALUE ( 'Slicer Item'[ID] ) + 1 },
        1,
        0
    ),
    1
)
2.PNG
Best regards,
Yuliana Gu
Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yulgu-msft
Employee
Employee

Hi @Garett52 ,

 

You need an extra table to list all unique IDs which will be added to slicer later, this table should be unrelated to both Table1 and Table2.

Slicer Item = DISTINCT(TB1[ID])
1.PNG
 
Add below measure to visual level filter.
Measure =
IF (
    ISFILTERED ( 'Slicer Item'[ID] ),
    IF (
        SELECTEDVALUE ( TB2[ID] )
            IN { SELECTEDVALUE ( 'Slicer Item'[ID] ), SELECTEDVALUE ( 'Slicer Item'[ID] ) + 1 },
        1,
        0
    ),
    1
)
2.PNG
Best regards,
Yuliana Gu
Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yulgu-msft 

 

Thanks for your reply. I'm still very new to PowerBI so I apologize if this is simple but I have two follow-up questions. First, in my example Table1 has some visual level filters applied to show only certain ID's, would it be possible to create a table from that using a filter on one column that only shows three of the available codes for the reference slicer?

Second, is it possible to do this without a slicer by selecting the ID in the first table? Currently I can select (highlight?) a row in the first table and it will show me all the ID's in the second table.

 

Thanks again 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.