Forum Discussion
Anonymous
6 years agoNot applicable
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...
- Anonymous6 years agoThis did the trickWanted =VAR countr =CALCULATE(COUNTROWS(Table),FILTER(Table,Table[ID] = EARLIER(Table[ID])&& Table[Result] = EARLIER(Table[Result])))Return IF(countr > 1, "Both", BLANK())
Anonymous
6 years agoNot applicable
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())