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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
there is application dataset contains ,application_id, activity name.. one application i having many multiple activiy name. so i would like have a calculated column if particular id having only certain activity name. here in below sample data in every id's have activity name abc along others name, but id 2 only have only abc value. so calculated column should be type B for id 2 other id type A.
| id | activity name | calculated column |
| 1 | abc | Type A |
| 1 | xyz | Type A |
| 1 | xy | Type A |
| 2 | abc | Type B |
| 2 | abc | Type B |
| 3 | abc | Type A |
| 3 | xy | Type A |
| 3 | py | Type A |
Thanks in Advance
Solved! Go to Solution.
ok, then try:
calculated column = IF(CALCULATE(DISTINCTCOUNT('applications'[activity name]),ALLEXCEPT('applications','applications'[id]), 'applications'[activity name] <> "abc") >0, "Type A", "Type B")
ok, then try:
calculated column = IF(CALCULATE(DISTINCTCOUNT('applications'[activity name]),ALLEXCEPT('applications','applications'[id]), 'applications'[activity name] <> "abc") >0, "Type A", "Type B")
Hi,
thanks! but i need consider value only i.e abc, as may be other id have distinct value with other value.
you haven't mentioned the table name, so for the example below I used "applications":
calculated column = IF(CALCULATE(DISTINCTCOUNT('applications'[activity name]),ALLEXCEPT('applications','applications'[id])) = 1, "Type B", "Type A")
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 13 | |
| 8 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 29 | |
| 19 | |
| 18 | |
| 11 | |
| 10 |