Forum Discussion
Return1 value for multiple criteria
- 7 years ago
Hi Anonymous
For this test data, create two measures
fail n = CALCULATE(COUNT(Sheet5[status]),FILTER(ALLEXCEPT(Sheet5,Sheet5[order]),Sheet5[status]="fail")) flag = IF([fail n]>0,"fail","pass")
Add them in a table visual
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
With a measure you should be able to do it with simply:
Measure = IF(SELECTEDVALUE('Table'[Status]) = "Pass" ; "Pass" ; "Fail" )
Put it in a matrix with your orders and it should return fail on all orders that have fails.
Unfortunately this shows which order line is pass or fail, but doesn't class an order as a whole as pass/fail (each order can contain both pass and fail lines, but if so, the order is failed).
- tex6287 years agoCommunity Champion
Measure = VAR OrderNo = SELECTEDVALUE('Table'[OrderNumber]) Return CALCULATE( IF(SELECTEDVALUE('Table'[Status]) = "Pass" ; "Pass" ; "Fail" ); ALL('Table'); 'Table'[OrderNumber] = OrderNo )Try this instead! :-)
- Anonymous7 years agoNot applicable
this didn't work off the bat, and after changeing the last 2 semicolons with commas, it worked, but just gives a pass result, and no fails
- tex6287 years agoCommunity Champion
Anonymous Are you referring to my code?