Forum Discussion

demian-cr's avatar
demian-cr
New Member
5 years ago
Solved

Return an entire column in a Data segment

Hello everyone. I would like to set a Data segment where, depending of the Filter of another one, an specific column of my database appears.   Example:  If in Data segment 1, I select the choice ...
  • v-kelly-msft's avatar
    v-kelly-msft
    5 years ago

    Hi  demian-cr ,

     

    I made a simple table as below:

    First create an index column in query editor;

    Then suppose col1 is the defaulting showing column,create a measure as below:

    Measure = 
    IF(NOT(ISFILTERED('Table (2)'[Column1])),MAX('Table'[Col 1]),SWITCH(SELECTEDVALUE('Table (2)'[Column1]),
    "Col 1",MAX('Table'[Col 1]),"Col 2",MAX('Table'[Col 2])))

    And you will see:

    For the related .pbix file,pls see attached.

     

    Best Regards,
    Kelly

    Did I answer your question? Mark my post as a solution!