Forum Discussion

tborg's avatar
tborg
Helper I
9 years ago
Solved

Filter between two values

I have 2 measusres meant to count how many advisors have 0 sales and how many have between 1-4 sales.  The below formula is meant to capture the second number, but as written it also captures those with 0 sales.  How do I modify it to capture only those with 1-4 sales?

 

1-4 RTA = CALCULATE(DISTINCTCOUNT(Advisors[Advisor Name]),FILTER(Advisors,Advisors[RTAs]<5))

 

Thanks!

  • Hey,

     

    guess this would work

    1-4 RTA = 
      CALCULATE(
        DISTINCTCOUNT(Advisors[Advisor Name])
        ,FILTER(Advisors
          ,Advisors[RTAs] >= 1 
          && Advisors[RTAs] <=5
        )
      )

    Regards

     

4 Replies

  • Hey,

     

    guess this would work

    1-4 RTA = 
      CALCULATE(
        DISTINCTCOUNT(Advisors[Advisor Name])
        ,FILTER(Advisors
          ,Advisors[RTAs] >= 1 
          && Advisors[RTAs] <=5
        )
      )

    Regards

     

    • tborg's avatar
      tborg
      Helper I

      Thanks!  I never would have guessed the double ampersand (&&)!