Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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
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 |
---|---|
84 | |
72 | |
68 | |
41 | |
35 |
User | Count |
---|---|
109 | |
56 | |
52 | |
48 | |
42 |