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!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hi all.
Need to Create a new column in power query with this SQL Statement
(TEXTO not like '%ORD 9%' and TEXTO not like '%ORD 6%' and TEXTO not like '%Reclassificação%' and TEXTO not like '%TRANSITORIA%' and(TEXTO <> '' or TEXTO_CAB like '%tarifa%'))
I tried this, but it did not work
if
List.AllTrue({
not Text.Contains([TEXTO], "ORD 9"),
not Text.Contains([TEXTO], "ORD 6"),
not Text.Contains([TEXTO], "Reclassificação"),
not Text.Contains([TEXTO], " "),
not Text.Contains([TEXTO], "TRANSITORIA"),
List.AnyTrue({
[TEXTO] <> "",
Text.Contains([TEXTO_CAB], "tarifa")
}),
})
then "True"
else "False"
Solved! Go to Solution.
@Anonymous wrote:
Can you show me how to create this column?
@Anonymous
You can just add a custom column via the UI if you don't know how to edit in the advanced editor. @Greg_Deckler's solution actually works in my test, when you say it doesn't work, could you be more specific?
Try this:
#"Added Conditional Column1" = Table.AddColumn(#"Unpivoted Columns", "Custom1", each if
List.AllTrue({
not Text.Contains([TEXTO], "ORD 9"),
not Text.Contains([TEXTO], "ORD 6"),
not Text.Contains([TEXTO], "Reclassificação"),
not Text.Contains([TEXTO], " "),
not Text.Contains([TEXTO], "TRANSITORIA"),
List.AnyTrue({
[TEXTO] <> "",
Text.Contains([TEXTO_CAB], "tarifa")
})
})
then "True"
else "False")
Don't worked
Can you show me how to create this column?
@Anonymous wrote:
Can you show me how to create this column?
@Anonymous
You can just add a custom column via the UI if you don't know how to edit in the advanced editor. @Greg_Deckler's solution actually works in my test, when you say it doesn't work, could you be more specific?
Thank you, But don't worked =/
I did not understand how to do this column, is not it an ordinary column?
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
| User | Count |
|---|---|
| 50 | |
| 41 | |
| 32 | |
| 26 | |
| 24 |
| User | Count |
|---|---|
| 131 | |
| 125 | |
| 59 | |
| 45 | |
| 43 |