Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to display rows reporting to a manager?

Hi ,

 

I know this may be posted before but I can't seem to find an exact solution to my problem.

I have a slicer with a list of owner names, but I would need to display all rows reporting to a employee, after a value is selected from the OwnerManager column.

For example, OwnerManager= Bala, I would need to display all records who is reporting to Bala, not just the direct reports.

How do I do that? Any advice is much appreciated. thank you!

 

 

OwnerNameOwnerManagerMH1FullNameMH2FullNameMH3FullNameMH4FullNameMH5FullNameMH6FullNameMH7FullName
ShadyBalaBennyRajaVelerieBala   
RoyAmyBennyRajaVelerieBalaAmy  
VenBalaBennyRajaVelerieBala   
PrinceBalaBennyRajaVelerieBala   
ReikiBalaBennyRajaVelerieBala   
ShadyTonyBennyRajaVelerieBalaTony  
AudreyBalaBennyRajaVelerieBala   
EricBalaBennyRajaVelerieBala   
ManiSnugBennyRajaVelerieBalaSnug  
AndrewBalaBennyRajaVelerieBala   
ReikiBalaBennyRajaVelerieBala   
GrammyBalaBennyRajaVelerieBala   
AudreyBalaBennyRajaVelerieBala   
AmyBalaBennyRajaVelerieBala   
AudreyBalaBennyRajaVelerieBala   
AmyBalaBennyRajaVelerieBala   
AmyBalaBennyRajaVelerieBala   

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    but this would mean the rows would be missing from the display:

     

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous ,

     

    According to my understanding, you want to show all records whose superiors(many levels) is selected in slicer,right?

    You could follow these steps:

     

    1.Create a new table with all distinct superiors for slicer.

    Duplicate table-->Unpivot other columns-->Delect other columns-->Remove blank and duplicate rows-->Rename table

    2. Use the following formula to create a measure

    Measure =
    VAR _sele =
        SELECTEDVALUE ( ForSlicer[Value] )
    RETURN
        IF (
            MAX ( 'Table'[OwnerManager] ) = _sele
                || MAX ( 'Table'[MH1FullName] ) = _sele
                || MAX ( 'Table'[MH2FullName] ) = _sele
                || MAX ( 'Table'[MH3FullName] ) = _sele
                || MAX ( 'Table'[MH4FullName] ) = _sele
                || MAX ( 'Table'[MH5FullName] ) = _sele,
            1,
            0
        )

    3. Apply the measure to visual-filter pane ans set as "=1":

     

    Here is my pbix file ,please check if this could meet your requirements.😀

     

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

7 Replies

  • timg's avatar
    timg
    Icon for Solution Sage rankSolution Sage

    Hi,

    Would this be solved by using the OwnerManager column as the filter?

    Best regards,

    Tim

    • Anonymous's avatar
      Anonymous
      Not applicable

      but this would mean the rows would be missing from the display:

       

      • timg's avatar
        timg
        Icon for Solution Sage rankSolution Sage

        Hi,

        Could you perhaps explain the issue in some more detail? Based on the data I was under the impression that These 3 rows should not be included when filtering on Bala since they report to Amy, Tony, and Snug.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    According to my understanding, you want to show all records whose superiors(many levels) is selected in slicer,right?

    You could follow these steps:

     

    1.Create a new table with all distinct superiors for slicer.

    Duplicate table-->Unpivot other columns-->Delect other columns-->Remove blank and duplicate rows-->Rename table

    2. Use the following formula to create a measure

    Measure =
    VAR _sele =
        SELECTEDVALUE ( ForSlicer[Value] )
    RETURN
        IF (
            MAX ( 'Table'[OwnerManager] ) = _sele
                || MAX ( 'Table'[MH1FullName] ) = _sele
                || MAX ( 'Table'[MH2FullName] ) = _sele
                || MAX ( 'Table'[MH3FullName] ) = _sele
                || MAX ( 'Table'[MH4FullName] ) = _sele
                || MAX ( 'Table'[MH5FullName] ) = _sele,
            1,
            0
        )

    3. Apply the measure to visual-filter pane ans set as "=1":

     

    Here is my pbix file ,please check if this could meet your requirements.😀

     

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you v much!