Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
I am getting the above error when trying to combine the MID function with the SEARCH function. Training Type = trim(MID(Competency[Survey Question],iferror(SEARCH(":",Competency[Survey Question],,0),0),iferror(SEARCH("-",Competency[Survey Question],,0),0))) The search functions work fine when using them alone without the MID function. SEARCH(":",Competency[Survey Question],,0) SEARCH("-",Competency[Survey Question],,0) When I try to use them as start and stop I get the error. If I replace the first search with a numerical number, it runs without error. Does anyone know if this is a known issue or have any suggestions? Thanks!
Solved! Go to Solution.
Hi @lisawinck,
If a Competency[Survey Question] doesn't have a ":", the second parameter of "MID" will be 0, which is illegal. I would suggest making some changes of the formula.
Training Type = TRIM ( MID ( Competency[Survey Question], IFERROR ( SEARCH ( ":", Competency[Survey Question],, 1 ), 1 ), IFERROR ( SEARCH ( "-", Competency[Survey Question],, 0 ), 0 ) ) )
BTW, it would be a good idea to format the formula with: http://www.daxformatter.com/
Best Regards!
Dale
Hi @lisawinck,
If a Competency[Survey Question] doesn't have a ":", the second parameter of "MID" will be 0, which is illegal. I would suggest making some changes of the formula.
Training Type = TRIM ( MID ( Competency[Survey Question], IFERROR ( SEARCH ( ":", Competency[Survey Question],, 1 ), 1 ), IFERROR ( SEARCH ( "-", Competency[Survey Question],, 0 ), 0 ) ) )
BTW, it would be a good idea to format the formula with: http://www.daxformatter.com/
Best Regards!
Dale
Also, that's a cool tool. Thanks!
That worked perfectly! Thank you!! I thought the zero was the correct method. Thanks for your help!
User | Count |
---|---|
84 | |
70 | |
68 | |
58 | |
51 |
User | Count |
---|---|
44 | |
41 | |
34 | |
34 | |
30 |