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.
Below code is working fine to get any values before "."
Column = MID('STC2019_T csv'[SAM],1,FIND(".",'STC2019_T csv'[SAM],1,0))
Column = MID('STC2019_T csv'[SAM],1,(FIND(".",'STC2019_T csv'[SAM],1,0)-1))Result :
Solved! Go to Solution.
Your FIND function is returning 0 if not found so the -1 turns the "Number of Characters" part in your MID equation to a negative number which cannot be accepted there since it can't retreive a negative amount of characters.
So...I haven't fully thought it through, but I'm fairly sure you can just change your not found value to one and you should be good.
Column = MID('STC2019_T csv'[SAM],1,(FIND(".",'STC2019_T csv'[SAM],1,1)-1))
Hi @Anonymous ,
I think there are integers in the column "SAM". As PANDAmonium said, it occurs the problem due to your find function returns 0. You need to set the number bigger,like 100. Then the integers will be displayed entirely.
Column = MID('STC2019_T csv'[SAM],1,(FIND(".",'STC2019_T csv'[SAM],1,100)-1))
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Your FIND function is returning 0 if not found so the -1 turns the "Number of Characters" part in your MID equation to a negative number which cannot be accepted there since it can't retreive a negative amount of characters.
So...I haven't fully thought it through, but I'm fairly sure you can just change your not found value to one and you should be good.
Column = MID('STC2019_T csv'[SAM],1,(FIND(".",'STC2019_T csv'[SAM],1,1)-1))
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 |
---|---|
96 | |
95 | |
82 | |
71 | |
64 |
User | Count |
---|---|
115 | |
105 | |
95 | |
79 | |
72 |