Forum Discussion
TabathaN
Advocate III
5 years agoGrouping 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"
)
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"
)
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
- DataInsights
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" ) - v-kelly-msft
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,
KellyDid I answer your question? Mark my post as a solution!