Forum Discussion

vidhyasankar's avatar
vidhyasankar
Frequent Visitor
4 years ago
Solved

Power BI DAX Filter Matrix/Table Based on Slicer Hierarchy Level

I've a parent / child slicer and would like to apply an extra filter when a child value is selected.  I want to use the native slicer and build a hierachy with Business as parent and Product as child.

 

BusinessProductRelationTeamFilter Column
HRHr1DedicatedAInclude
HRHr1GenericBExclude
MarketingMkt1DedicatedCInclude
MarketingMkt1GenericDExclude
MarketingMkt2GenericEExclude
MarketingMkt2DedicatedFInclude

 

When a parent is selected in the hierachy, eg. "Marketing", I'd like to show all 4 teams C, D, E & F.  However, when a child hierachy value is selected, eg. Mkt1, then I want to exclude the Generic relation rows in the table or matrix.  The reason is Generic teams support entire Business and should be shown only at business level, where as dedicated teams are only for specific products.

 

Expected output when Marketing is selected at parent level

 

BusinessProductRelationTeam
MarketingMkt1DedicatedC
MarketingMkt1GenericD
MarketingMkt2GenericE
MarketingMkt2DedicatedF

 

Expected output when Mkt1 is selected under Marketing (should exclude Gneric Relation Team)

BusinessProductRelationTeam
MarketingMkt1DedicatedC

 

Is this scenario possible?

 

I tried creating a Measure using ISFILTERED to get the level of hierarchy but couldn't figure out a way to use that as a filter inside table.

 

Thanks a lot!

  • Anonymous's avatar
    Anonymous
    4 years ago

    vidhyasankar 

    My suggest is just include the filter column in the Hierarchy. Otherwise you may need to create a distinct table with a few measures making measures to filter to the selected slicer.

     

    Paul Zheng _ Community Support Team
    If this post helps, please Accept it as the solution to help the other members find it more quickly.

3 Replies

    • vidhyasankar's avatar
      vidhyasankar
      Frequent Visitor

      Thanks a lot for the response!  The link shows calculation of measures based on parent / child hierarchy.  In my requirement there are no numerical values.  Just apply extra filter to exclude cetrain rows if a child member is selected.

  • Anonymous's avatar
    Anonymous
    Not applicable

    vidhyasankar 

    My suggest is just include the filter column in the Hierarchy. Otherwise you may need to create a distinct table with a few measures making measures to filter to the selected slicer.

     

    Paul Zheng _ Community Support Team
    If this post helps, please Accept it as the solution to help the other members find it more quickly.