The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
My guess is you should declare the 4th argument of FIND ( ) as BLANK ( ). Something like:
= FIND ( " -", 'Table'[Column1], ,BLANK ( ) )
Proud to be a Super User!
Hey @ChrisMendoza
I wasn't so much looking for a workaround, more a like an understanding of why the iserror appears to fail. As for the solution, I created myself the following :
@DouweMeer wrote:Hey @ChrisMendoza
...
As a test I changed my original to your suggestion:Entity =VAR a1 = find ( " -" , [Classification] )VAR a2 = len ( [Classification] )VAR a3 = trim( right ( [Classification] , a2 - a1 -1 ) )VAR a4 = FIND ( " -", a3 ,BLANK ( ) )VAR a6 = if ( a4 = BLANK() , BLANK() , trim ( left ( a3 , a4 -1 ) ) )RETURNif ( iserror ( a6 ) , "True" , a6 )This returns the following error :An argument of function 'FIND' has the wrong data type or has an invalid value.I wouldn't mind to validate another attempt if you want to give it another shot via your method.
You missed the comma in
VAR a4 = FIND ( " -", a3 ,BLANK ( ) )
Should be
VAR a4 = FIND ( " -", a3, ,BLANK ( ) )
Can you provide a sample of your data?
Proud to be a Super User!
Felt a bit like:
Your suggestion was able to replace the if iserror boolean. Afterwards I read to documentation. Learned something new today :).
Do you, by any chance, know why my first solution didn't worked?
I do not know the reason for the failure. In a sample I created I did not receive a failure. That is the reason I asked for a sample from you 🙂
Proud to be a Super User!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
99 | |
93 | |
81 | |
63 | |
56 |
User | Count |
---|---|
248 | |
123 | |
111 | |
78 | |
74 |