The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello,
I'm trying to create a calculated column with two conditions on IF.
First criteria: If column1 contains "rtb+"
Second criteria: if column2 doesn't contain "Deals_"
#"RTB+ Impressions_clm" =
Table.AddColumn(Hb_Impressions_clm, "RTB+ Impressions", each if (Text.Contains([#"Column1"], "RTB+")
and (not Text.Contains([#"Column2"], "Deals_")))
then [Impressions]
else null)
What i'm doing wrong?
Thank you,
Grigoris
Solved! Go to Solution.
@polman4 , seem fine
if (Text.Contains([#"Column1"], "RTB+") and ( not Text.Contains([#"Column2"], "Deals_"))
then [Impressions]
else null
but it is case sensitive , you can use Text.Upper, example
if (Text.Contains(Text.Upper([#"Column1"]), "RTB+") and ( not Text.Contains([#"Column2"], "Deals_"))
then [Impressions]
else null
@polman4 , seem fine
if (Text.Contains([#"Column1"], "RTB+") and ( not Text.Contains([#"Column2"], "Deals_"))
then [Impressions]
else null
but it is case sensitive , you can use Text.Upper, example
if (Text.Contains(Text.Upper([#"Column1"]), "RTB+") and ( not Text.Contains([#"Column2"], "Deals_"))
then [Impressions]
else null
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
79 | |
71 | |
48 | |
41 |
User | Count |
---|---|
138 | |
108 | |
71 | |
64 | |
58 |