Forum Replies Created
-
AuthorPosts
-
I had noticed that you were missing the two parentheses and gave you that answer without testing it.
When I modeled the problem, I ran across a couple of things. First, you can’t use “Find” to find a string inside a column. When I found that out, I looked for another function that would work. I found “Search” and said aha, that should do it. Wrong. It should work but I get an error when I tried it (in both Excel 2016 and Power BI). I banged my head a couple of times and finally came up with the following:
IF (
MID ( ’2017-01-25_Tickets_Data'[ASSET NAME], 8, 2 ) = “DC”,
“DC”,
IF ( MID (’2017-01-25_Tickets_Data'[ASSET NAME], 9, 2 ) = “AC”, “L2”, “checkTicket” )
)
For this to work, you must know the position for the search characters, and if you have more than a few different search characters, it would become unwieldy.
If the search characters would not occur anywhere else in the search string, you could also try a Get & Transform conditional column with “contain”.It looks like you are missing the right parentheses on both find functions.
Where you have:
IF(IFERROR(FIND(“DC”,’2017-01-25_Tickets_Data'[ASSET NAME],8,”DC” – try
IF(IFERROR(FIND(“DC”,’2017-01-25_Tickets_Data'[ASSET NAME],8,”DC”)Where you have:
IF(IFERROR(FIND(“AC”,’2017-01-25_Tickets_Data'[ASSET NAME],8,”L2″ – try
IF(IFERROR(FIND(“AC”,’2017-01-25_Tickets_Data'[ASSET NAME],8,”L2″) -
AuthorPosts