Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello!
I need help to get the characters from a certain text using DAX. I have this Column "JobType". See table below.
| Jobtype | NC.IN | Phase | Status |
| NC 120_Rough Builder Walk__10Not Started | NC | NC 120_Rough Builder Walk | 10Not Started |
| NC.IN 720_Dehu_Estimate__90Complete | NC.IN | NC.IN 720_Dehu_Estimate | 90Complete |
| IN 622_CO EQ_QC__90Complete | IN | IN 622_CO EQ_QC | 90Complete |
| Install_Estimates |
I have to use a DAX to get the characters for the Phase and Status Column from Jobtype column with this condition. If Column NC.IN is "" then ""
else
Phase column is extracted before the __(2underscores)
Status column is extracted after the __(2underscores)
I am confused what correct DAX formula to use.
Thank you.
Solved! Go to Solution.
Hi @juhoneyighot ,
Below are DAX codes for creating new column,
Hi @juhoneyighot ,
Below are DAX codes for creating new column,
hi @juhoneyighot ,
in cases like this and you can, it makes more sense to do it in Power Query. Try to add a custom column like:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8nNWMDQyiA/KL03PUHAqzcxJSS1SCE/MyY6PNzTwyy9RCC5JLCpJTVHSASoFEzjUA+VQNcTqgEzX8/RTMAdqcEnNKI13LS7JzE0sSY2PtzRwzs8tyEktSQWbCVQFozFVA2WQlIOMBaoyMzKKd/ZXcA2MD3RGMw5sFpoSUs2AothYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Jobtype = _t, NC.IN = _t, Phase = _t, Status = _t]),
#"Added Custom" = Table.AddColumn(
Source,
"Custom",
each if [NC.IN]=""
then ""
else
Text.AfterDelimiter(
[Jobtype],
"_",
Text.Length([Jobtype]) - Text.Length( Text.Remove([Jobtype], "_" ))-1
)
),
#"Added Custom2" = Table.AddColumn(#"Added Custom", "Custom2", each if [NC.IN]=""
then ""
else
Text.BeforeDelimiter(
[Jobtype],
"_",
Text.Length([Jobtype]) - Text.Length( Text.Remove([Jobtype], "_" ))-2
)
)
in
#"Added Custom2"
it worked like:
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |