Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Help building a query, many2many

I have a list of product ID's and the users that order certain products.  I am looking to find a count for the number of ID's that have one, the other, and both of certain users.  In reality, the use...
  • Anonymous's avatar
    Anonymous
    6 years ago
    This did the trick
     
    Wanted =
    VAR countr =
    CALCULATE(
    COUNTROWS(Table),
    FILTER(Table,
    Table[ID] =  EARLIER(Table[ID])
    && Table[Result] = EARLIER(Table[Result])
    ))
    Return IF(countr > 1, "Both", BLANK())