The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I would like to change "Type" column attributes by creating a calculated column. The "type B" is more valuable than the "type A". So, for each person in the table, if we have both types then replace them by "type B" otherwise leave it as it is.
Solved! Go to Solution.
@Anonymous , A new column
new column =
var _cnt = countx(filter(Table, Table[ID] =earlier([ID]) && [Type] = "Type B") , [ID])
return
if(isblank(_cnt), [Type], "Type B")
@Anonymous , A new column
new column =
var _cnt = countx(filter(Table, Table[ID] =earlier([ID]) && [Type] = "Type B") , [ID])
return
if(isblank(_cnt), [Type], "Type B")