Forum Discussion
Help with formula please
- 5 years ago
Hi Anonymous
The Greg_Deckler solution will 100% cover your request; Just remove that Bracket ) at the end.
and if you want to replace "null" with blank use this:
if [Job Family] = "Direct Sales" and Text.Contains([Job Title] , "Account Executive") then "AE" else ""If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos✌️!!
Sorry, I should have been more clear. I have a roster of people. I want to identfy "Account executives", but I need to use 2 fields for this: I need the job family column to be "Direct Sales" and I need the job title to contain "account executive". I want a new column called "AE role" that says "AE" when both these criteria are true.
Here is my data:
| ID | Job Title | Job Family | AE Role |
| 3 | Account Executive 4, Business Development - Sales | Business Development - Sales | |
| 4 | Account Executive 4, Channel Sales | Channel Sales | |
| 9 | Account Executive 1, Channel Sales | Channel Sales | |
| 14 | Account Executive 5, Direct Sales | Direct Sales | AE |
| 24 | Account Executive 4, Direct Sales | Direct Sales | AE |
| 25 | Account Executive 2, Services Sales | Services Sales | |
| 26 | Account Executive 2, Business Development - Sales | Business Development - Sales |
I get this when I try to add a custom column, unless, is there a way to add a conditional column with an AND?
Thank you!!
Anonymous You are trying to use DAX in Power Query and that is not going to work out very well for you. You need to do this in a calculated column in Power BI Desktop, not Power Query Editor. Or you need the M equivalent which is something along the lines of:
if [Job Family] = "Direct Sales" and Text.Contains([Job Title],"Account Executive")then "AE" else null)- VahidDM5 years ago
Super User
Hi Anonymous
The Greg_Deckler solution will 100% cover your request; Just remove that Bracket ) at the end.
and if you want to replace "null" with blank use this:
if [Job Family] = "Direct Sales" and Text.Contains([Job Title] , "Account Executive") then "AE" else ""If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos✌️!!
- Greg_Deckler5 years ago
Community Champion
VahidDM Thanks, missed that paren!!