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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi All,
I am hoping to get a quick hand on how to create a DAX column in my model.
I am looking to recategorise Individual rows with a DAX expression where a user could fall into one of two categories (A or B) and in any case where a user has been tagged as category A, we want to recategorise those other rows as category A also. My original data looks like this:
| User | Category |
| 1 | A |
| 1 | B |
| 1 | B |
| 1 | A |
| 2 | B |
| 2 | B |
| 2 | B |
| 3 | B |
| 3 | B |
| 3 | A |
I want to add a column with a DAX expression which recategorises the Users based if any row is category A such that the results should look like this:
| User | Category | Recategorised |
| 1 | A | A |
| 1 | B | A |
| 1 | B | A |
| 1 | A | A |
| 2 | B | B |
| 2 | B | B |
| 2 | B | B |
| 3 | B | A |
| 3 | B | A |
| 3 | A | A |
This looks like it should be a simple expression but I haven't been able to work it out so far.
Thanks
Solved! Go to Solution.
hi, @MaxwellB
try below code for column
Column =
var category_value = CALCULATETABLE(VALUES('Table (2)'[Category]),ALL('Table (2)'[Category]))
RETURN
IF("A" in category_value,"A",'Table (2)'[Category])
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hi, @MaxwellB
try below code for column
Column =
var category_value = CALCULATETABLE(VALUES('Table (2)'[Category]),ALL('Table (2)'[Category]))
RETURN
IF("A" in category_value,"A",'Table (2)'[Category])
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Amazing thank you! 😊
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |
| User | Count |
|---|---|
| 21 | |
| 20 | |
| 20 | |
| 14 | |
| 14 |