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.
Email = RIGHT(RE_Usage_Data[User],LEN(RE_Usage_Data[User])-3)&"@xyz.com"
Hello!
When I entered the function above into the Data view in Power BI, I receive an error stating "An Argument of function 'RIGHT' has the wrong data type or has an invalid view."
In piecing the formula apart, it looks like the "-3" is causing the issue. With this formula, I'm trying to do the following:
and return the following:
The RE_Usage_Data[User] field is formatted as text - I'm thinking Power BI is not liking that I'm subtracting 3 from the ar/john.b.smith text. However, based on how this formula is structured, it should be taking the LEN value of 15 and subtracting 3. 12 should be in the RIGHT formula as the number of characters, and no errors should be returned. I'm also able to replicate this formula in Excel with no issues - it's also worked in other Power BI files.
Is there anything I can adjust in my formula or any other workarounds to get rid of this error?
Thanks for the help!
Solved! Go to Solution.
The issue is you have a value with 3 or less characters somewhere in your list. Try this formula instead.
Email = Var Length = LEN(RE_Usage_Data[User]) RETURN IF( Length <= 3, "", right([Name], Length - 3) & "@xyz.com" )
The issue is you have a value with 3 or less characters somewhere in your list. Try this formula instead.
Email = Var Length = LEN(RE_Usage_Data[User]) RETURN IF( Length <= 3, "", right([Name], Length - 3) & "@xyz.com" )
Thank you for the help! That worked!
As a measure:
Measure 7 = RIGHT(MAX(Email[Column1]),LEN(MAX(Email[Column1]))-3)&"@xyz.com"
I don't know, that worked for me as a column, are you trying to do this aas a measure?
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 |
---|---|
107 | |
98 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |