Right way to use MATCHES and "NOT MATCHES" for email IDs

Hi,
We are trying to count number of bugs assigned and not assigned to particular company, using email ID of custom assignee field. We referred several examples of regular expression provided in EazyBI community discussions and documentation. But, there is mismatch in the count.

Bugs assigned to members of company email-ID

Aggregate({
  Filter(
  [Bug AssignedTo].[Bug AssignedTo].Members,
	[Bug AssignedTo].CurrenthierarchyMember.Name MATCHES (".*@abc.def-ghi.xyz.com.*")
  )
})

Bugs NOT assigned to members of company email-ID

Aggregate({
  Filter(
  [Bug AssignedTo].[Bug AssignedTo].Members,
	NOT [Bug AssignedTo].CurrenthierarchyMember.Name MATCHES (".@abc.def-ghi.xyz.com.*")
  )
})

Any recommendations to fine-tune this?
Thanks,
Vrukesh

Hi, Vrukesh,

First, please check if the “Bug AssignedTo” member name contains an e-mail in it; that can be easily done by adding “Bug AssignedTo” dimension in Rows and creating a report-specific measure using this formula: " [Bug AssignedTo].CurrenthierarchyMember.Name"

The first regular expression syntax is valid. Also, you can use the expression ".*@abc.def-ghi.xyz.com" as that identifies that the email expression is at the end of the name.
The second expression on the other hand is missing an asterisk at the beginning of the expression; instead of (".@abc.def-ghi.xyz.com.*") use (".*@abc.def-ghi.xyz.com.*")

If this doesn’t help, can you please share more details about what you mean by “mismatch in the count”.

Best regards,
Ilze support@eazybi.com