Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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?