Forum Discussion

PatrickByGecko's avatar
6 years ago
Solved

This filter clause do as its own mind

Hello
I can't understand why this filter returns information about agency of "Paris" and "Aix" when I'm only asking for "Niort".

CALCULATE(AVERAGE('Affectation Collaborateurs'[TAUX HSITE]);FILTER('Affectation Collaborateurs';'Affectation Collaborateurs'[AGENCE] ="Niort" ))

 

 

 

Can somebody explain where I'm wrong?

  • dax's avatar
    dax
    6 years ago

    Hi,

    So it seems that you solved this problem, right? If so and if you'd like to, you could mark corresponding post as answer or share your solutions. That way, people who in this forum and have similar issue will benefit from it.

    Best Regards,
    Zoe Zhi

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

12 Replies

    • PatrickByGecko's avatar
      PatrickByGecko
      Icon for Helper V rankHelper V

      I just tried it gives this formula =>

      Moyenne de TAUX HSITE pour Niort =
      CALCULATE(
          AVERAGE('Affectation Collaborateurs'[TAUX HSITE]);
          'Affectation Collaborateurs'[AGENCE] IN { "Niort" }
      )
      And it returns always for Aix and Paris too...
      • dax's avatar
        dax
        Icon for Community Support rankCommunity Support

        Hi PatrickByGecko,

        You need to use measure instead of calculated column(which will apply result to all table), you could refer to my sample for details.

        Best Regards,
        Zoe Zhi

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