Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
graefs
Frequent Visitor

Custom Column for Unique ID

I am looking to create a column that categorizes each group based on the result of multiple columns. 

 

A: IPC = No; Client = A

B: IPC = No;  Client = B

Mixed: IPC = No; Client = A and B

IPC: IPC = Yes; Client = A

IPC Mixed: IPC = Yes; Client = B

 

It seems simple but has left me stumped. Any help is greatly appreciated.

 

 

Data Example:

Group

ID

IPCClientDesired Result

1

123

NoAMixed

1

456

NoBMixed

1

789

NoBMixed

2

987

YesAIPC Mixed

2

654

YesAIPC Mixed

2

321

NoB

IPC Mixed

3

903

NoA

A

3

284

NoA

A

3

842

NoA

A

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@graefs 

you can try this

 

Column =
var _ipc=maxx(FILTER('Table','Table'[Group]=EARLIER('Table'[Group])&&'Table'[IPC]="Yes"),'Table'[IPC])
var _count =CALCULATE(DISTINCTCOUNT('Table'[Client]),ALLEXCEPT('Table','Table'[Group]))
return if(_ipc="Yes" && _count>1,"IPC Mixed",if(_ipc="" && _count>1,"Mixed",'Table'[Client]))
 
11.PNG




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
ryan_mayu
Super User
Super User

@graefs 

you can try this

 

Column =
var _ipc=maxx(FILTER('Table','Table'[Group]=EARLIER('Table'[Group])&&'Table'[IPC]="Yes"),'Table'[IPC])
var _count =CALCULATE(DISTINCTCOUNT('Table'[Client]),ALLEXCEPT('Table','Table'[Group]))
return if(_ipc="Yes" && _count>1,"IPC Mixed",if(_ipc="" && _count>1,"Mixed",'Table'[Client]))
 
11.PNG




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Kaviraj11
Super User
Super User

Hi,

 

Create a new column:

 

Category =
SWITCH(
TRUE(),
'Table'[IPC] = "No" && 'Table'[Client] = "A", "A",
'Table'[IPC] = "No" && 'Table'[Client] = "B", "B",
'Table'[IPC] = "No" && 'Table'[Client] IN {"A", "B"}, "Mixed",
'Table'[IPC] = "Yes" && 'Table'[Client] = "A", "IPC",
'Table'[IPC] = "Yes" && 'Table'[Client] = "B", "IPC Mixed",
BLANK()
)




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.