Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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:
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
7 | |
5 | |
4 | |
3 |
User | Count |
---|---|
12 | |
11 | |
10 | |
9 | |
8 |