Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Distinct count with previous date criteria

Hi, can anyone help me to understand what logic I need to apply to my existing table in order to return correct data?   Example table with underlying data called 'Table 1';   This is my cur...
  • v-yalanwu-msft's avatar
    3 years ago

    Hi, Anonymous ;

    I create a simple test file. and create a measure as follow:

    Measure = 
    COUNTROWS(EXCEPT(VALUES('Table'[ID]),
    SUMMARIZE(FILTER(ALL('Table'),
    [Date]<=MIN('Table'[Date])&&[Date]>=EDATE(MIN('Table'[Date]),-12)),[ID])))
    

    the final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.