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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
kristel_tulio
Helper III
Helper III

Extracting specific text using measure

Hi!,

 

I would like to ask if I can use calculated measure in extracting specific values instead of using calculated column because I will just use the result in other measures so need to add column and to saved up some space? 

 

This is my current calculation:

It's getting the last 4 strings but I want to get only those with "_" and number at the end and leaving blank those without.

 

Remove size =
var _text = RIGHT( MAX( Job[Number] ), 4 )

return
IF( ISBLANK( _text ), BLANK(), _text )

 

kristel_tulio_0-1674609290017.png

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @kristel_tulio 

try like:

Measure =
var _number = MAX( Job[Number] )
RETURN
IF(
    CONTAINSSTRING(_number, "_"),
    RIGHT(_number, 3)
)

View solution in original post

3 REPLIES 3
FreemanZ
Super User
Super User

hi @kristel_tulio 

try like:

Measure =
var _number = MAX( Job[Number] )
RETURN
IF(
    CONTAINSSTRING(_number, "_"),
    RIGHT(_number, 3)
)

Hi @FreemanZ ,

 

I just have a bit of concern can I make it an integer and show the total? And I would like to filter it using my date table. There's an indirect relationship between my Date table and that Job table. Thanks for helping out!

Apparently the date table is not working when I change the year.

kristel_tulio_0-1674716667546.png

 

Hi @FreemanZ,
That works! Thank you so much 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.