Forum Discussion
ilTac
5 years agoFrequent Visitor
SUM based on specific condition
Hello everyone, i've been trying on this for a while and it seems i'm not able to do it. I think it should be simple but anyway: here's my database: I would like to see % of good pieces...
- 5 years ago
I tested this solution and it worked for my sample data set
Pieces Below Company Target :=Var BelowTarget =CALCULATE(CALCULATE(sum(DataTest[Pieces]), FILTER(DataTest, [% Good Pieces] < [Target])),all(DataTest))RETURNIF( [% Good Pieces] < [Target], BelowTarget)Pieces Above Company Target :=Var AboveTarget =CALCULATE(CALCULATE(sum(DataTest[Pieces]), FILTER(DataTest, [% Good Pieces] > [Target])),all(DataTest))RETURNIF( [% Good Pieces] > [Target], AboveTarget) - 5 years ago
thedatahiker
5 years agoMicrosoft Employee
ilTac Did I answer your question? Mark my post as a solution
ilTac
5 years agoFrequent Visitor