Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi Team,
I haven't get result in the below funcion from M-Query.
= Table.AddColumn(Rule1, "Rule2", each if(Text.Start([#"Temp (NTM)"] ,3) <> "DCL" or Text.Start([#"Temp (NTM)"],3) <> "DSA" or Text.Start([#"Temp (NTM)"] ,3) <> "DBC" ))
then "Placed"
else null)
Data look liks this,
KV's
Solved! Go to Solution.
Hi @Anonymous ,
Try this:
= Table.AddColumn(#"Changed Type", "Custom", each if Text.StartsWith([#"Temp(NTM)"], "DCL") then "" else if Text.StartsWith([#"Temp(NTM)"], "DSA") then "" else if Text.StartsWith([#"Temp(NTM)"], "DBC") then "" else "PLACED")
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Try this:
= Table.AddColumn(#"Changed Type", "Custom", each if Text.StartsWith([#"Temp(NTM)"], "DCL") then "" else if Text.StartsWith([#"Temp(NTM)"], "DSA") then "" else if Text.StartsWith([#"Temp(NTM)"], "DBC") then "" else "PLACED")
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , what should happen, then is missing
Table.AddColumn(Rule1, "Rule2", each if(Text.Start([#"Temp (NTM)"] ,3) <> "DCL" or Text.Start([#"Temp (NTM)"],3) <> "DSA" or Text.Start([#"Temp (NTM)"] ,3) <> "DBC" then <> else <> ))
else is optional
Hi @amitchandak ,
i can't paste my raw data so i shared my post in screenshot.
please help me.
Thanks,
KV's
@Anonymous , I they should be and
Table.AddColumn(Rule1, "Rule2", each if(Text.Start([#"Temp (NTM)"] ,3) <> "DCL" and Text.Start([#"Temp (NTM)"],3) <> "DSA" and Text.Start([#"Temp (NTM)"] ,3) <> "DBC" ))
then "Placed"
else null)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
55 | |
55 | |
37 | |
30 |
User | Count |
---|---|
78 | |
64 | |
45 | |
43 | |
40 |