Forum Discussion

SJ25's avatar
SJ25
Resolver I
6 years ago
Solved

DISTINCT COUNT with Filter

Hey Guys, 

 

I'm trying to find out how many orders are past due, and I'm using the below formula but it's giving me an incorrect number

 

Measure = CALCULATE( DISTINCTCOUNT(Sheet1[Order]), FILTER(Sheet1, Sheet1[Due Date] < Today()))
 
Thought it would be straught forward, but what am I missing?? Any help would be appreciated.
  • I figured it out. There were a bunch of rows in the Due Date column that were blank and were causing the issue. Apologies for not looking at it. Thanks for your help az38 

5 Replies

  • az38's avatar
    az38
    Community Champion

    Hi SJ25 

    try to use ALL() in filter

    Measure = CALCULATE( DISTINCTCOUNT(Sheet1[Order]), FILTER(ALL(Sheet1), Sheet1[Due Date] < Today()))
    • SJ25's avatar
      SJ25
      Resolver I

      Just tried but the output didn't change 😕