Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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-blend Deposit
bills bills
withdraws withdraws
mail Deposits Deposit
Thanks a lot !
Solved! Go to Solution.
@tmacfrank try using the search function
newtype = IF(SEARCH("Deposit",table1[type],1,0),"Deposit",table1[type])
@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)
it say too many arguments were passed to the OR function.
@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)
Thanks a lot!!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |