Forum Discussion
Anonymous
4 years agoNot applicable
Count using different criteria on two columns
Helloo, how to count entries on column "Mailbox" where status is = "Queried - Onshore", "Queried - PO", "Oustanding - Sent to Rudy", "Can't Book", "Pending - Audit", "Pending - KL Audit", "Outstandi...
- 4 years ago
Hi Anonymous ,
Try this:
Adhoc = VAR _MailType = "ADHOC" VAR _CriteriaArr = { "Queried - Onshore", "Queried - PO", "Oustanding - Sent to Rudy", "Can't Book", "Pending - Audit", "Pending - KL Audit", "Outstanding", "Not Started" } RETURN CALCULATE(COUNTROWS ('CA Mailbox'), 'CA Mailbox'[Status] IN _CriteriaArr,'CA Mailbox'[Mailbox] = _MailType)
Fowmy
Super User
4 years agoAnonymous
Following measure should work for:
Adhoc =
CALCULATE (
COUNTROWS ( 'CA Mailbox'[Mailbox] ),
'CA Mailbox'[Mailbox]
IN {
"Queried - Onshore",
"Queried - PO",
"Oustanding - Sent to Rudy",
"Can't Book",
"Pending - Audit",
"Pending - KL Audit",
"Outstanding",
"Not Started"
}
)
- Anonymous4 years agoNot applicable
Thanks but still show inaccurate report, it supposed to output a total of 8 entries but it shows 22 entries 😞
- Fowmy4 years ago
Super User
Anonymous
Please share a dummy file with this calucaltion to check and understand your scenario- Anonymous4 years agoNot applicable
Hello Fowmy
Here ya go
https://drive.google.com/drive/folders/1Ipqht-1wSOMu2kcdx5oJ5f5CU4aqsOnT?usp=sharing
- Fowmy4 years ago
Super User
hnguy71
You need to add a filter on the MailBox for Adhoc and filter Status to given valuesAdhoc = CALCULATE ( COUNTROWS ( 'CA Mailbox'[Mailbox] ), 'CA Mailbox'[Status] IN { "Queried - Onshore", "Queried - PO", "Oustanding - Sent to Rudy", "Can't Book", "Pending - Audit", "Pending - KL Audit", "Outstanding", "Not Started" }, 'CA Mailbox'[Mailbox] = "Adhoc" )