cancel
Showing results for
Search instead for
Did you mean:
Advocate I

## Grouping an EXACT Match

Hello,

I have a formula, below, that groups data based on provider ID. The actual formula is quite long and contains multiple groupings like this. The issue I'm having is that if there is another provider, lets say....who's number is 337, that provider will also show in this grouping because of a partial match to the "37". How can I change this formula so it only pulls exact matches?

Supervising Provider Team =
IF (
SEARCH ( "37", Transactions[Supervising Provider ID],, -1 ) > -1
|| SEARCH ( "115", Transactions[Supervising Provider ID],, -1 ) > -1
|| SEARCH ( "74", Transactions[Supervising Provider ID],, -1 ) > -1,
"Team Byrd",
"Error - Contact Tabatha"
)
1 ACCEPTED SOLUTION
Super User

@TabathaN, try this calculated column:

``````Supervising Provider Team =
SWITCH (
TRUE (),
Transactions[Supervising Provider ID] IN { 37, 115, 74 }, "Team Byrd",
Transactions[Supervising Provider ID] IN { 38, 116, 75 }, "Team X",
"Error - Contact Tabatha"
)``````

2 REPLIES 2
Community Support

Hi  @TabathaN ,

If you need to pull exact matches,use below dax expression:

``````Supervising Provider Team =
SWITCH (
TRUE (),
Transactions[Supervising Provider ID] IN { 37, 115, 74 }, "Team Byrd",
"Error - Contact Tabatha"
)``````

I made a sample,see below:

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

Super User

@TabathaN, try this calculated column:

``````Supervising Provider Team =
SWITCH (
TRUE (),
Transactions[Supervising Provider ID] IN { 37, 115, 74 }, "Team Byrd",
Transactions[Supervising Provider ID] IN { 38, 116, 75 }, "Team X",
"Error - Contact Tabatha"
)``````

## Helpful resources

Announcements

#### Launching new user group features

Learn how to create your own user groups today!

#### Check it Out!

Click here to read more about the November 2021 Updates!

#### Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors