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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
manishsalanke
Helper II
Helper II

conditional column for different entity

hi , community we have a conditon in which we need to create a calulated column using dax for vendor ,agent ,party .we have to create a bucket for agent ,party and agentFor party we have this listFor party we have this list

 

for vendors we have this listfor vendors we have this list

 

for agent we have thisfor agent we have this

 need to create a calculated column containg agent ,vendor, party

1 ACCEPTED SOLUTION

@manishsalanke 
I Suppose you have that column in the main table and you have 3 lists (vendor ,agent ,party) in 3 separate tables. As follows:
'Table'[Column]
Vendors[Vendor]
Agents[Agent]
Parties[Party]

The new column would be

NewColumn =
SWITCH (
    TRUE (),
    'Table'[Column] IN VALUES ( Agents[Agent] ), "Agent",
    'Table'[Column] IN VALUES ( Vendors[Vendor] ), "Vendor",
    'Table'[Column] IN VALUES ( Parties[Party] ), "Party"
)

 

View solution in original post

3 REPLIES 3
tamerj1
Super User
Super User

Hi @manishsalanke 
The requirement is not clear. Perhaps you can clarify further with examples.

actully we have one column which contains names and now we need to create a new column which contains values for party ,vendor ,agentThis column we have and we have to group few values as agent ,other for vendors and remaing partyThis column we have and we have to group few values as agent ,other for vendors and remaing party

 

this is how we want to see it in other columnthis is how we want to see it in other column

@manishsalanke 
I Suppose you have that column in the main table and you have 3 lists (vendor ,agent ,party) in 3 separate tables. As follows:
'Table'[Column]
Vendors[Vendor]
Agents[Agent]
Parties[Party]

The new column would be

NewColumn =
SWITCH (
    TRUE (),
    'Table'[Column] IN VALUES ( Agents[Agent] ), "Agent",
    'Table'[Column] IN VALUES ( Vendors[Vendor] ), "Vendor",
    'Table'[Column] IN VALUES ( Parties[Party] ), "Party"
)

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.