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())
v-gizhi-msft
Community Support
6 years agoHi,
Please try this measure:
Wanted =
IF (
MAX ( 'Table'[ID] )
= CALCULATE (
MAX ( 'Table'[ID] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[User] = 'Table'[Result]
&& 'Table'[ID] IN FILTERS ( 'Table'[ID] )
)
),
"Both",
BLANK ()
)The result shows:
Hope this helps.
Best Regards,
Giotto Zhi