Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi Experts
I cannot see my error on the SEARCH VAR in the following
Error Message
Measure =
VAR _USERPRINCIPALNAME = CONCATENATE(SELECTEDVALUE(pg_control_cases[country_dim.country_name]),SELECTEDVALUE(pg_control_cases[store_name]))
VAR SeparatorPosition = SEARCH(",",_USERPRINCIPALNAME)
VAR _Country = LEFT(_USERPRINCIPALNAME, SeparatorPosition - 1)
VAR _Store = RIGHT(_USERPRINCIPALNAME, SeparatorPosition + 1)
RETURN
SeparatorPosition
Solved! Go to Solution.
thanks, getting a 0 - surely this should be 1
You can provide values for the 3rd and 4th terms in the SEARCH function to avoid that. The 4th is the not found value. Usually people put 1 for the start position and 0 for not found.
Pat
thanks, getting a 0 - surely this should be 1
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.