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 - How can I use IF and Contains together when writing a dax?
So the dax should be
IF table 1 , coulmn email contains "@gmail.com" then return "Gmail" else other
Table 1
ggg@gmail.com |
nnn@yahoo.com |
kkk@apple.com |
mmmm@bananna.com |
kkkkk@pear.com |
Solved! Go to Solution.
As a calculated column:
Gmail? = IF(CONTAINSSTRING('Table 1'[Email], "gmail"), "gmail", "Other")
As a measure:
gmail measure =
IF(CONTAINSSTRING(MAX('Table 1'[Email]), "gmail"), "gmail", "other")
Proud to be a Super User!
Paul on Linkedin.
As a calculated column:
Gmail? = IF(CONTAINSSTRING('Table 1'[Email], "gmail"), "gmail", "Other")
As a measure:
gmail measure =
IF(CONTAINSSTRING(MAX('Table 1'[Email]), "gmail"), "gmail", "other")
Proud to be a Super User!
Paul on Linkedin.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.