Forum Discussion

sh_Himanshu's avatar
sh_Himanshu
Regular Visitor
1 year ago

Help with DAX when Multiple measures are used in Matrix

Hello All,

This is very easy & silly DAX mistake I am doing, new to DAX so need your help to acheive the result.

 

Attaching my sample pbix file here PowerBi Sample . If you see there  I have a matrix visual where i have used multiple measures to calculate the count of cases on few conditions. 
Issue is when i click onany of the columns value belos printed table doesn't filter it properly. It is showing total row values. 

I want if i click on App team's implementation value, Table also show only those lines.

Please help me with this asap. Thanks in Advance

5 Replies

  • sh_Himanshu 
    I suggest you to check the TAM table: 

    The "Email" column which is used in the relationship has duplicated values, therefore it can not filter "AppTeam" alone, it will include also the Team_Name with "Other" -->which have the same email of AppTeam.
    Once you have this resolved you should use the TAM[Team_Name] on the columns of a table to segment the values as you need, and the measure proposed here. 

    Team =
    CALCULATE(
        COUNT( 'Cases'[Case_Number] ),
        'Cases'[Pending_Code]
            IN {
                "Pending Development",
                "Pending Research"
            }
    )


    I hope this helps, if so, please mark as solution. Kudos are welcome😁.

    • sh_Himanshu's avatar
      sh_Himanshu
      Regular Visitor

      pcoley  Thanks for answering. But this is the scenario here. One person assigned to multiple teams to handle different issues as well and most probably that's why I wanted to handle it through FILTER.
      Another thing I think I can't use Team Name under column segment, because depending on Pending_Code we are dividing our data.
      Example : Pending_Development , Pending Research & App Team = APP
      Pending_Development , Pending Research & Non App Team = NON
      Apart from the above combination other Count will be there in third column like "Pending" or belong to some other Teams.

      Please help here to create or fulfill that behavior. Thanks


  • To fix the issue:

    1. Review Your Measures: Ensure they respect filter context. Avoid using ALL or REMOVEFILTERS unless needed.

      Example:Measure = CALCULATE( COUNT(Cases[CaseID]), FILTER(Cases, Cases[Team] = "App Team") ) 

    2. Check Visual Interactions: Ensure the Matrix and Table visuals are set to interact. Go to Format > Edit Interactions and verify the filter icon is active.

    3. Test Measures: Use simpler measures to check if filtering work:  Measure = COUNT(Cases[CaseID])
      If the issue persists, recheck the relationships in your data model to ensure proper filtering propagation.