Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 9 | |
| 8 | |
| 8 | |
| 8 |