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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
dommyw277
Helper IV
Helper IV

Measure - if contains A10, B11 etc

One of our Databases is really locked down, we cant create columns, only measures.

Is there anyway i can create a measure where it looks at the column called requester.

The column is made up of 3 letters or a name- if it contains just 3 letters can it return say "accounts" otherwise its "something else"?

 

1 ACCEPTED SOLUTION
mickey64
Super User
Super User

For your reference.

 

Step 0: I use these data below.

mickey64_0-1778088570166.png

 

Step 1: I make a measure and table below.

Measure = IF(NOT ISBLANK(MAX('DATA'[requester])) && LEN(MAX('DATA'[requester]))=3, "accounts", "something else")
mickey64_1-1778088639456.png

 

 

View solution in original post

3 REPLIES 3
cengizhanarslan
Super User
Super User

Please try the measure below:

Requester Type =
VAR _Requester = SELECTEDVALUE ( Table1[Requester] )
RETURN
    IF (
        LEN ( _Requester ) = 3,
        "Accounts",
        "Something Else"
    )

But remember since it is a measure and not a column, it cannot be used as a legend, axis, or slicer field directly. But it can still be used as a displayed value in a table visual or as a visual-level filter.

 

_________________________________________________________
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.
mickey64
Super User
Super User

For your reference.

 

Step 0: I use these data below.

mickey64_0-1778088570166.png

 

Step 1: I make a measure and table below.

Measure = IF(NOT ISBLANK(MAX('DATA'[requester])) && LEN(MAX('DATA'[requester]))=3, "accounts", "something else")
mickey64_1-1778088639456.png

 

 

krishnakanth240
Resident Rockstar
Resident Rockstar

Hi @dommyw277 

 

Yes, we can handle it using a measure even without creating a column in Power BI. Can you try this measure

Requester Type =

VAR Req = SELECTEDVALUE('Table'[requester])

RETURN

IF(NOT ISBLANK(Req) && LEN(Req) = 3, "accounts", "something else")

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.