Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I want to search with IF and SEARCH to create a single value from multiple values.
My problem is that it works when I only search one value, but if I search multiple values I get an error : "Too few arguments were passed to the IF function. The minimum argument count for the function is 2."
#Searching 1 value at a time (working)
Newcolumn = if(search("name1", 'databasename'[Table], 1, 0 ) > 0, "Newname1", 'databasename'[Table])
#Searching 2 values at a time (not working)
Newcolumn = if(search("name1", 'databasename'[Table], 1, 0 ) > 0, "Newname1", 'databasename'[Table]), if(search("name2", 'databasename'[Table], 1, 0 ) > 0, "Newname2", 'databasename'[Table])
Anyone a solution?
Regards,
Poweringbi
Solved! Go to Solution.
Hi @Anonymous
its completely wrong statement
try
Newcolumn = if(search("name1", 'databasename'[Table], 1, 0 ) > 0, "Newname1", if(search("name2", 'databasename'[Table], 1, 0 ) > 0, "Newname2", 'databasename'[Table]))
do not hesitate to give a kudo to useful posts and mark solutions as solution
Hi @Anonymous
its completely wrong statement
try
Newcolumn = if(search("name1", 'databasename'[Table], 1, 0 ) > 0, "Newname1", if(search("name2", 'databasename'[Table], 1, 0 ) > 0, "Newname2", 'databasename'[Table]))
do not hesitate to give a kudo to useful posts and mark solutions as solution
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
23 | |
10 | |
10 | |
9 | |
7 |