Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Return multiple values from related table, using slicer selection

Hello,

 

This sounds basic, but could not get to a proper solution, so a little help is appreciated.

 

Basically, a value is selected on a slicer and then single or multiple values should be returned from another, related table.

I know how to return multiple values with concatenatex and I had a feeling I need to get this work with calculate & relatedtable, but could not get there. I have a slicer with a field from Voyage Detail and I am trying to return a field from Global Port, once I select 1 slicer value. I wanted to avoid going down a route with LOOKUPVALUE, but I thought that might work here as well.

Link to the 3 tables concerned:

https://ibb.co/y0H79Bx

 

 

 

 

 
 
 
 
  • Anonymous's avatar
    Anonymous
    6 years ago

    Thanks for asking, I actually did realize what I was doing wrong, I just had to stop and return to it, nevertheless, thanks for being helpful!

     

    I was just trying to return multiple values on a card from a related table, based on a slicer selection.

    In the end I used concatenatex, wrapped in a calculate, where I FILTER the table, using a variable for the currently selected value of the ID.

    Measure =
    VAR MyID=
    SELECTEDVALUE ( ID)
    RETURN
    CALCULATE (
    CONCATENATEX ( VALUES ( dPort), dPort[Discharge Port], ", " ),
    FILTER ( 'ShipRoutes', 'ShipRoutes'[ID] = MyID)
    )

3 Replies

  • The information you have provided is not making the problem clear to me. Can you please explain with an example.
    Can you share sample output in table format?
    Appreciate your Kudos.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for asking, I actually did realize what I was doing wrong, I just had to stop and return to it, nevertheless, thanks for being helpful!

       

      I was just trying to return multiple values on a card from a related table, based on a slicer selection.

      In the end I used concatenatex, wrapped in a calculate, where I FILTER the table, using a variable for the currently selected value of the ID.

      Measure =
      VAR MyID=
      SELECTEDVALUE ( ID)
      RETURN
      CALCULATE (
      CONCATENATEX ( VALUES ( dPort), dPort[Discharge Port], ", " ),
      FILTER ( 'ShipRoutes', 'ShipRoutes'[ID] = MyID)
      )

      • v-easonf-msft's avatar
        v-easonf-msft
        Community Support

        Hi , Anonymous 


        Could you please tell me whether your problem has been solved?
        If it is,  please mark the helpful replies or add your reply as Answered to close this thread.

        More people will learn new things here. If you haven't, please feel free to ask.

         

        Best Regards,
        Community Support Team _ Eason