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.
I have table that looks like this:
id | Actityvity | Device |
1 | Relax | Mobile |
2 | Hyper | PC |
3 | Laid Back | Mobe |
4 | Relax | Mobile |
5 | Hyper | PC |
6 | Laid Back | Mobile |
I'm trying to create a new caloumn by applying the If statement in Dax, to say: IF Activity = Relax And Device= Mobile Then 1.
What the best way to go about it.
Thanks
Solved! Go to Solution.
Hi @Anonymous ,
Create a New Column
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Hi @Anonymous ,
Create a New Column
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Are you trying to make a calculated column or a measure? If a column, you can use this expression (substitute the name of your table for 'Table')
NewColumn = if(AND(Table[Activity]="Relax", Table[Device]="Mobile"), 1, 0)
If this works for you, please mark it as solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hi mohoneypat,
unfortunately, using this dax isn't recognizing my table.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.