Forum Discussion
Sum with multiple criteria
- 3 years ago
kg4u you are using wrong value in your measure, missing "d" from some of the value, here is the correct measure. Pay attention to your data.
Quality Sales = CALCULATE ( [Total Sales], KEEPFILTERS ( 'Quality Data'[Status] in { "Issued Paid", "Issued Paid|ARF", "Issued Paid|PDR", "Issued Paid|NY PIF", "Issued Paid|PDR|NY PIF" } ) )and here is the output
✨ Follow us on LinkedIn and to our YouTube channel
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop shop for Power BI-related projects/training/consultancy.
Hi kg4u
Try the following as the syntax "||" works as the OR operator.
Quality Sales2 =
CALCULATE (
SUM ( 'Fact Agency Data'[Original Sales] ),
FILTER (
'Fact Agency Data',
'Fact Agency Data'[Status] = "Issue Paid"
|| 'Fact Agency Data'[Status] = "Issue Paid|ARF"
|| 'Fact Agency Data'[Status] = "Issue Paid|PDR"
|| 'Fact Agency Data'[Status] = "Issue Paid|NY PIF"
)
)
- kg4u3 years agoHelper II
I tried with the pipes, and I'm not getting a result in the data table. The Quality Sales Number should be $15,547,136.23
Attached is a snippet of the dataset I'm working with. The Quality number for this snippet should be $9,183.35.
Original Sales Status $748.00 Issued Paid $62.70 Issued Paid $1,485.00 Issued Paid $1,731.95 Issued Paid $791.45 Issued Paid $1,826.00 Issued Paid $2,538.25 Issued Paid