Forum Discussion

EaglesTony's avatar
EaglesTony
Post Prodigy
2 years ago
Solved

How do I get a table filled based on another table

Hi,

 

  I have a datasource table, which has

 

Type            Key           Parent

Solution      S123         T123

Solution      S456         T123

Feature       F123          S123

Feature       F456          S123

Feature       F999          S123

 

1) I have a slicer which has all the Keys where the Type=Solution

2) I have Table1 on the report that shows all the Solutions and is driven by the slicer (All=show all or select a specific Solution Key, i.e. S123)

 

3) The next table on the report, is where I need to show the following if S123 Solution is selected:

F123

F456

F999

 

  • Hi EaglesTony 

    Check the attached for the solution. I have created a disconnected table for slicer and used 2 measures as visual level filter.

    If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

    Follow me on LinkedIn!!!

5 Replies

  • NaveenGandhi's avatar
    NaveenGandhi
    Memorable Member

    Hi EaglesTony 

    Check the attached for the solution. I have created a disconnected table for slicer and used 2 measures as visual level filter.

    If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

    Follow me on LinkedIn!!!

      • NaveenGandhi's avatar
        NaveenGandhi
        Memorable Member
        EaglesTony 

        below 2 measures are used as visual level filter, The slicer value comes from a disconnected table.

        t1_filter =

        if(SELECTEDVALUE('Table'[Key]) in VALUES(Solutions[Table_Key]),1,0)

        t2_filter =

        if(SELECTEDVALUE('Table'[Parent]) in VALUES(Solutions[Table_Key]),1,0)
  • I was thinking maybe some way using the "selected value" of the table selection ? or since they data is in the same table trying to setup a parent/child relationship, not sure if self-relationships are allowed?

  • Hi,

    Here's my approach

    1. Create another table (Table1) of all the unique key
    2. Create the following relationships:
      1. Many to One and Active from the Key column of the Data Table to Table1
      2. Many to One and Inactive from the Parent column of the Data Table to Table1
      3. To your slicer, drag Key from the Table1
      4. To the Table visual, drag Type and write this measure

    Measure = calculate(countrows(Data),userelationship(Data[Parent],Table1[Key]))

    Hope this helps.