Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
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
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.