Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Filter another column based on a Distinctcount

HELP PLEASE, Can anyone assist with debugging this measure, from the 2 columns of the table, I want to distinctcount the datetime column, unless the associated count column value is less than 10?? TIA Daniel

 

  • This looks like a couple of syntax errors. You need a close parenthesis for DISTINCTCOUNT and another for CALCULATE. Also, there should not be a space between > and =.

     

    Try this:

    15m count NEW =
    CALCULATE (
        DISTINCTCOUNT ( 'Larapinta Stats (2)'[datetime] ),
        FILTER ( 'Larapinta Stats (2)', 'Larapinta Stats (2)'[Count] >= 10 )
    )
  • Anonymous's avatar
    Anonymous
    4 years ago

    Excellent thankyou!

2 Replies

  • This looks like a couple of syntax errors. You need a close parenthesis for DISTINCTCOUNT and another for CALCULATE. Also, there should not be a space between > and =.

     

    Try this:

    15m count NEW =
    CALCULATE (
        DISTINCTCOUNT ( 'Larapinta Stats (2)'[datetime] ),
        FILTER ( 'Larapinta Stats (2)', 'Larapinta Stats (2)'[Count] >= 10 )
    )
    • Anonymous's avatar
      Anonymous
      Not applicable

      Excellent thankyou!