Forum Discussion

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

Measure makes table visual ignore filter

Just got the answer for another similar question - but posting new question as I think they are different.

 mahoneypat  - you were quick to answer my last, wondering if you have an idea here. 

Same tables - Now the relationship is many to 1 JiraHdrSet to Project table

When I add a slicer from the Project table, my table visual works fine.

When I add the calculation into the table visual - the filter now gets ignored

TotalDest = CALCULATE(COUNT(JiraLinkSet[DestId])) +0

TIA for any advice!

7 Replies

  • mahoneypat's avatar
    mahoneypat
    Icon for Microsoft Employee rankMicrosoft Employee

    Why are you using CALCULATE in this case?  It shouldn't be needed.  Try it without that (just COUNT +0).

     

    If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

    Regards,

    Pat

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

      Took the calculate out - same result (although I'm sure that's better from an efficiency point of view.

      • mahoneypat's avatar
        mahoneypat
        Icon for Microsoft Employee rankMicrosoft Employee

        Use the Project column from the same table as your slicer, not the one in the column you are doing the count in.  That is the side effect of the "+0" approach.  It shows you all the calculations Power BI does behind the scenes but filters out because they are blank.  When you add zero, nothing returns blank anymore.  It is evaluating all the values of Project in the fact table, which is why you are seeing those.  If you use the slicer Project column, that will get filtered too.

         

        If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

        Regards,

        Pat