Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Distinct count

I am trying to return distinct count from my table using sysdate- 30 and 60 and 90 days in three different measure. Can someone advise me the easy way to achieve this?
  • az38's avatar
    6 years ago

    hi Anonymous 

    try

    Measure90 = CALCULATE(DISTINCTCOUNT(Table1[Column1]);ALL(Table1);Table1[Date]>=(Today()-90))
    Measure60 = CALCULATE(DISTINCTCOUNT(Table1[Column1]);ALL(Table1);Table1[Date]>=(Today()-60))
    Measure30 = CALCULATE(DISTINCTCOUNT(Table1[Column1]);ALL(Table1);Table1[Date]>=(Today()-30))

    do not hesitate to give a kudo to useful posts and mark solutions as solution
    Linkedin