Forum Discussion

kristel_tulio's avatar
kristel_tulio
Helper III
3 years ago
Solved

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 )

 

 

  • hi kristel_tulio 

    try like:

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

3 Replies

  • hi kristel_tulio 

    try like:

    Measure =
    var _number = MAX( Job[Number] )
    RETURN
    IF(
        CONTAINSSTRING(_number, "_"),
        RIGHT(_number, 3)
    )
    • kristel_tulio's avatar
      kristel_tulio
      Helper III

      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.