Forum Discussion
Replace mutilple values in a column
- Anonymous8 years ago
tmacfrank try using the search function
newtype = IF(SEARCH("Deposit",table1[type],1,0),"Deposit",table1[type])
Works perfectly, Thanks a lot.
However, I cannot search two or more values at one time, don't I.
for example
newtype = IF(SEARCH("Deposit" or "Dep",table1[type],1,0),"Deposit",table1[type]), do i need one more if for searching "Dep". Thanks
tmacfrank umm try like a normal or
IF(OR(SEARCH("Deposit",col1,1,0),SEARCH("Dep",col1,1,0),"Depost", col1)
- tmacfrank8 years agoFrequent Visitor
it say too many arguments were passed to the OR function.
- Anonymous8 years agoNot applicable
tmacfrank i just realized or in power bi only takes 2 values, here are your options..
1) do or like this, where you sepearate all conditions by a pipe
X = 1 || 2 || 3 || 5
2) use a switch
switch(true(),
SEARCH("Deposit",col1,1,0),"Deposit"
SEARCH("Dep",col1,1,0),"Deposit",
SEARCH("Depo",col1,1,0),"Deposit",
col1)
- tmacfrank8 years agoFrequent Visitor
Thanks a lot!!