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 Team,
I want to create a new column next to Partner type,
if Partner type is below values then new column(descripton) should show below values, please suggest formula or any other method.
ZZK1LTSD0074K table name, zz_partner_type is the column name.
Partner type Description
RE BILL TO
RG PAYER
WE SHIP_TO
EL END USER LOC
EU END_USER
ZK DIST
ZR RESELLER
Solved! Go to Solution.
Hi @Harish85,
The easiest way is to use DAX:
Description =
SWITCH(
'ZZK1LTSD0074K'[zz_partner_type],
"RE", "BILL TO",
"RG", "PAYER",
"WE", "SHIP_TO",
"EL", "END USER LOC",
"EU", "END_USER",
"ZK", "DIST",
"ZR", "RESELLER",
"Unknown" -- Default value for any unmatched partner types
)
But if your dataset is Large You should use Power query:
Column Name: Description
If [zz_partner_type] = "RE" then "BILL TO"
Else If [zz_partner_type] = "RG" then "PAYER"
Else If [zz_partner_type] = "WE" then "SHIP_TO"
Else If [zz_partner_type] = "EL" then "END USER LOC"
Else If [zz_partner_type] = "EU" then "END_USER"
Else If [zz_partner_type] = "ZK" then "DIST"
Else If [zz_partner_type] = "ZR" then "RESELLER"
Else "Unknown"
I’ve done something similar 🙂. You’ve got two good options:
Option 1: DAX calculated column with SWITCH
Go to Modeling → New column and use:
Description =
SWITCH(
[zz_partner_type],
"RE", "BILL TO",
"RG", "PAYER",
"WE", "SHIP_TO",
"EL", "END USER LOC",
"EU", "END_USER",
"ZK", "DIST",
"ZR", "RESELLER",
BLANK() // default
)
This will create the new Description column right next to your Partner type.
Option 2 (cleaner for long-term):
Make a small 2-column table (Partner type ↔ Description) and relate it to your main table. That way, if you ever add more partner types, you only update the mapping table instead of editing the DAX formula.
👉 Tip: If you just need a quick fix, go with SWITCH. If you want scalability, build the small mapping table.
I’ve done something similar 🙂. You’ve got two good options:
Option 1: DAX calculated column with SWITCH
Go to Modeling → New column and use:
Description =
SWITCH(
[zz_partner_type],
"RE", "BILL TO",
"RG", "PAYER",
"WE", "SHIP_TO",
"EL", "END USER LOC",
"EU", "END_USER",
"ZK", "DIST",
"ZR", "RESELLER",
BLANK() // default
)
This will create the new Description column right next to your Partner type.
Option 2 (cleaner for long-term):
Make a small 2-column table (Partner type ↔ Description) and relate it to your main table. That way, if you ever add more partner types, you only update the mapping table instead of editing the DAX formula.
👉 Tip: If you just need a quick fix, go with SWITCH. If you want scalability, build the small mapping table.
I’ve done something similar 🙂. You’ve got two good options:
Option 1: DAX calculated column with SWITCH
Go to Modeling → New column and use:
Description =
SWITCH(
[zz_partner_type],
"RE", "BILL TO",
"RG", "PAYER",
"WE", "SHIP_TO",
"EL", "END USER LOC",
"EU", "END_USER",
"ZK", "DIST",
"ZR", "RESELLER",
BLANK() // default
)
This will create the new Description column right next to your Partner type.
Option 2 (cleaner for long-term):
Make a small 2-column table (Partner type ↔ Description) and relate it to your main table. That way, if you ever add more partner types, you only update the mapping table instead of editing the DAX formula.
👉 Tip: If you just need a quick fix, go with SWITCH. If you want scalability, build the small mapping table.
I’ve done something similar 🙂. You’ve got two good options:
Option 1: DAX calculated column with SWITCH
Go to Modeling → New column and use:
Description =
SWITCH(
[zz_partner_type],
"RE", "BILL TO",
"RG", "PAYER",
"WE", "SHIP_TO",
"EL", "END USER LOC",
"EU", "END_USER",
"ZK", "DIST",
"ZR", "RESELLER",
BLANK() // default
)
This will create the new Description column right next to your Partner type.
Option 2 (cleaner for long-term):
Make a small 2-column table (Partner type ↔ Description) and relate it to your main table. That way, if you ever add more partner types, you only update the mapping table instead of editing the DAX formula.
👉 Tip: If you just need a quick fix, go with SWITCH. If you want scalability, build the small mapping table.
Hi @Harish85 ,
I would also take a moment to thank @Ahmed-Elfeel , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions
Hi @Harish85 ,
I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.
Hi @Harish85,
The easiest way is to use DAX:
Description =
SWITCH(
'ZZK1LTSD0074K'[zz_partner_type],
"RE", "BILL TO",
"RG", "PAYER",
"WE", "SHIP_TO",
"EL", "END USER LOC",
"EU", "END_USER",
"ZK", "DIST",
"ZR", "RESELLER",
"Unknown" -- Default value for any unmatched partner types
)
But if your dataset is Large You should use Power query:
Column Name: Description
If [zz_partner_type] = "RE" then "BILL TO"
Else If [zz_partner_type] = "RG" then "PAYER"
Else If [zz_partner_type] = "WE" then "SHIP_TO"
Else If [zz_partner_type] = "EL" then "END USER LOC"
Else If [zz_partner_type] = "EU" then "END_USER"
Else If [zz_partner_type] = "ZK" then "DIST"
Else If [zz_partner_type] = "ZR" then "RESELLER"
Else "Unknown"
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |