Forum Discussion
Susan513
2 years agoHelper II
Return value if all rows in multiple categories match
Looking for solution to evaluate multiple rows based on multiple categories. In my example, I want to know per site, per category - if all the documents in the sites' category are resolved for the si...
- 2 years ago
pls try this
RESULT = VAR _t1 = CALCULATE(COUNTROWS(),ALLEXCEPT('Table','Table'[Site],'Table'[Category])) VAR _t2 = CALCULATE(COUNTROWS(),ALLEXCEPT('Table','Table'[Site],'Table'[Category]),'Table'[Status]="Resolved" ) RETURN if (_t1 = _t2 ,"Complete", "Incomplete" )
Susan513
2 years agoHelper II
Thank you for addressing - it looked to work - but I added one more row on Site A for bikes #88, and it is not flagging the Cars as Complete. I think it needs to also look at the category, as the comparison is for a site, and also the rows in each category. Teh Site A rows for Cars are resolved - so the result should be Complete. I am getting Incomplete.
Ahmedx
2 years agoSuper User
pls try this
RESULT =
VAR _t1 = CALCULATE(COUNTROWS(),ALLEXCEPT('Table','Table'[Site],'Table'[Category]))
VAR _t2 = CALCULATE(COUNTROWS(),ALLEXCEPT('Table','Table'[Site],'Table'[Category]),'Table'[Status]="Resolved" )
RETURN
if (_t1 = _t2 ,"Complete", "Incomplete" )- Susan5132 years agoHelper II
Thank you - this is working, I appreciate you!