Forum Discussion
tmacfrank
8 years agoFrequent Visitor
Replace mutilple values in a column
Hi, I want all that contian "Deposit" in column [type] become "Deposit" in a new column. Others remain the same. Any hint for DAX ? type new type Deposits-bl...
- Anonymous8 years ago
tmacfrank try using the search function
newtype = IF(SEARCH("Deposit",table1[type],1,0),"Deposit",table1[type])
Anonymous
8 years agoNot applicable
tmacfrank umm try like a normal or
IF(OR(SEARCH("Deposit",col1,1,0),SEARCH("Dep",col1,1,0),"Depost", col1)
tmacfrank
8 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!!