Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
FP68
Helper I
Helper I

Syntax problem

Hello,

I've a clolumn with a long string [TAGS] in which I can find "ApplicationName=xxxxxx"
In this string, each data is separate with ";"
I just want to know the position of the ";" after the "ApplicationName=..."

Countries2 = 

var _x= SEARCH("ApplicationName",[TAGS],0,-1)

var _z= SEARCH(";",[TAGS],value(_x),blank())

RETURN _z

My column Countries2 is a Text data type and I've the message "An argument of function "SEARCH" has the wrong data type or has an invalid value"
Thanks a lot for your help

1 ACCEPTED SOLUTION
MasonMA
Super User
Super User

Hi, 

You may try

Countries2 =
VAR _x =
    SEARCH ( "ApplicationName=", [TAGS], 1, BLANK() )
VAR _z =
    _x + LEN ( "ApplicationName=" )
VAR _result=
    SEARCH ( ";", [TAGS], _z, BLANK() )
RETURN
    _result
 
Tested with some random data. 
MasonMA_2-1769436241966.png

 


 


 

View solution in original post

3 REPLIES 3
FP68
Helper I
Helper I

Thanks a lot, it works fine

cengizhanarslan
Super User
Super User

Please try the measure below:

Countries2 =
VAR _x =
    SEARCH ( "ApplicationName=", [TAGS], 1, -1 )
VAR _z =
    IF (
        _x > 0,
        SEARCH ( ";", [TAGS], _x, BLANK() ),
        BLANK()
    )
RETURN
_z
_________________________________________________________
If this helped, ✓ Mark as Solution | Kudos appreciated
Connect on LinkedIn | Follow on Medium
AI-assisted tools are used solely for wording support. All conclusions are independently reviewed.
MasonMA
Super User
Super User

Hi, 

You may try

Countries2 =
VAR _x =
    SEARCH ( "ApplicationName=", [TAGS], 1, BLANK() )
VAR _z =
    _x + LEN ( "ApplicationName=" )
VAR _result=
    SEARCH ( ";", [TAGS], _z, BLANK() )
RETURN
    _result
 
Tested with some random data. 
MasonMA_2-1769436241966.png

 


 


 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.