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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi, in below table, I would like to have a category column with below conditions:
1. If No. is same, Type is same, then outcome follow Type string
2. If No. is same, Type is different, then outcome will be "Mix"
No. | Type | Desired Outcome |
010724120026 | EUD | EUD |
010724120026 | EUD | EUD |
010724120026 | EUD | EUD |
010724230815 | Non-EUD | Non-EUD |
010724230815 | Non-EUD | Non-EUD |
010724230815 | Non-EUD | Non-EUD |
250624070814 | EUD | Mix |
250624070814 | Non-EUD | Mix |
250624070814 | EUD | Mix |
Thanks.
Regards,
LC
Solved! Go to Solution.
@Tan_LC , You can create a calculated column for this
Category =
VAR CurrentNo = 'YourTableName'[No]
VAR CurrentType = 'YourTableName'[Type]
VAR TypeCount = CALCULATE(
COUNTROWS('YourTableName'),
ALLEXCEPT('YourTableName', 'YourTableName'[No]),
'YourTableName'[Type] <> CurrentType
)
RETURN
IF(TypeCount > 0, "Mix", CurrentType)
Proud to be a Super User! |
|
@Tan_LC , You can create a calculated column for this
Category =
VAR CurrentNo = 'YourTableName'[No]
VAR CurrentType = 'YourTableName'[Type]
VAR TypeCount = CALCULATE(
COUNTROWS('YourTableName'),
ALLEXCEPT('YourTableName', 'YourTableName'[No]),
'YourTableName'[Type] <> CurrentType
)
RETURN
IF(TypeCount > 0, "Mix", CurrentType)
Proud to be a Super User! |
|