Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Selected Value DAX

Hi,

 

I have two tables : Example - 

 

Table 1 -                         Table 2 -

   Key       Test                       Key       Production

    A           Version 1                D           Version 1

    B           Version 2                 E           Version 2

    C           Version 3                 F           Version 3

 

I have added Table 1 "Test" column to "Filter on all pages" in PBI desktop. My scenario is when a user selects a version from the filter - ([Test] Version 1,[Test] Version 2 or [Test] Version 3),  Is there a way I can filter table 2 to show the exact value? I mean if user selects "Version 1" from "filter on all pages", Table 2 should get filtered to show only "Version 1"

 

Any help is highly appreciated. Thanks.

 

7 Replies

  • Create a common dimension Test and join with both tables

     

    Test = distinct(Table1[Test])

     

    And join with both the tables. Use this in slicer or page level filter

    Join Test[Test] - Table1[Test]

    and join Test[Test] - Table2[Production]

     

    Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
    In case it does not help, please provide additional information and mark me with @

    Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
    Proud to be a Datanaut Connect on Linkedin

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Amit,

       

      sorry I don't understand. How do you propose I join the two tables? 

      The first is a measure and I cannot join it with a table. 

  • Hi Anonymous ,

     

    Create a relationship between TABLE1 and TABLE2 using "KEY" column, which is common to both of the tables.

     

    Kindly give Kudos if this is helpful, or mark as a Solutions if it works! 🙂

     

    Thanks,

    Pragati

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Pragati,

       

      I have already created a relationship between them. Say [Key] A has [Test] Version 1 but [Production] Version 2 as per below table:

       

      Table 1 -                         Table 2 -

         Key       Test                       Key       Production

          A           Version 1                C          Version 1

          B           Version 2                 A           Version 2

          C           Version 3                 B           Version 3

       

      So when I filter [Test] Column to Version 1. [Production] column in table 2 is getting filtered to show Version 2 which is related to Key A. But what I want is when I filter [Test] column to Version 1. [Production] should also filter to Version 1. Should I delete the direct relationship between them for this to happen?