Forum Discussion
Measure to find and return specific text from Calculated Column
Power BI gurus I need your help.
I am trying to combine data from 8 different columns into a calculated column. Then I am trying to find and return specific text from this calculated column.
Initial Data (8 Columns)
Calculated Column Concatenating the data from the 8 columns
Finally, I am trying to create a measure that will:
- Search for "-1-13/" and return the "14" number just right after the "/" (example based on 1st row of data)
Can you help me with how to do this using measures instead of using additional calculated columns? Thank you very much!
1 Reply
- MFelix
Super User
Hi airportGR ,
To what I can understand from the values I'm seeing the concatenation you have is based on the values from two specific columns and the return the values with a order before them in this case:
1-13/14 it concerns the values from the columns Delay code 1 and Delay Time1
Why don't you get the simply do a measure that get's the values from those two columns in this case something similar to:
Delay Time = CALCULATE ( MAX( Table[Delay_Time1] ), Table[Delay_Code1] = 13 )No need for additional calculated columns, you can also use a slicer to filter the 13, and no need to have a calculate just the:
Delay Time = MAX( Table[Delay_Time1] )Does this makes sense to you?
In the cases where you have more than one value for the DelayCode (example 93) how do you know what is the line you are looking for?