Forum Discussion

dude95's avatar
dude95
Icon for Resolver I rankResolver I
6 years ago
Solved

Child Table - Only display for Parent selected on report

Maybe this is an easy one - I don't know.

 

I have a report that contains two tables  - Issues and Issue Comments.  Both are keyed off of Issue ID and linked by that field in the model.

 

What I'd like to to is only show comments that are selected in the issue table.  The tricky part is when there is no issue selected, no comments should show.  Is that possible?

6 Replies

    • dude95's avatar
      dude95
      Icon for Resolver I rankResolver I

      This is close to what I'm looking for and I can incorporate it into the mix. 

       

      The one loop is that this is on a project report and I don't want to have a slicer for issue id.  What I'd like to have happen is that all of the issues are displayed in the table - then a user can select a single Issue ID in the table itself - causing the issue comments to filter.

       

      A slicer means that the user would have to look at the issue IDs that are displayed, then go find that ID in the slicer drop down rather than just click on the individual issue row.

       

      Is there a way to figure out if a row in the issue table is selected?  Then incorporate your solution to the Issue Comments table?  Basically if there is a row selected in the issues table, I'll uncover the records in the comments table as you gave in your solution.

      • VipulToshniwal's avatar
        VipulToshniwal
        Icon for Helper I rankHelper I

        Hi dude95 ,

         

        What you are looking for is certainly possible. But, it is difficult to write down in theory terms. If possible upload some sample data and a screenshot of your current report, then it will be more easy to draft an actual DAX.

    • dude95's avatar
      dude95
      Icon for Resolver I rankResolver I

      On a whim - decided to test approach with selecting a record in table vs slicer.  Same variable works and this solution is good!  Thank you for your help.

  • Hi dude95 ,

     

    Make sure the relationship in your data model is many(comments) to one(issues). Create a slicer panel that has issues as values and Select single select only option form selection control. Also, create table visual displaying the comments column. This will display the comments from default/selected value only. It is not possible to blank upon no-selection without DAX. You can use the SWITCH function for that.