Forum Discussion
PBInewbie00
1 year agoNew Member
SWITCH using conditions from two tables
Hello, Searched all over the forum, but I haven't been able to find a good workaround for my problem. I'm trying to create a new column to rename products based on columns from two different tabl...
- Anonymous1 year ago
Hi PBInewbie00 ,
I ceate a table as you mentioned.
Then I think you can create a new calculated column.
Column = SWITCH( TRUE(), 'Table'[PRODUCT] = "Cash" && 'Table'[CODE] = "ASST", "CASH", 'Table'[PRODUCT] = "Assets" && 'Table'[CODE] = "ASST", "ASST", 'Table'[PRODUCT] = "Commission" && 'Table'[CODE] = "COMM", "COMM", 'Table'[PRODUCT] = "Derivatives" && 'Table'[CODE] = "DERIV", "DERIV", 'Table'[PRODUCT] = "Cash" && 'Table'[CODE] = "DERIV", "CASH", 'Table'[PRODUCT] = "Cash" && 'Table'[CODE] = "LOAN", "CASH", 'Table'[PRODUCT] = "Loans" && 'Table'[CODE] = "LOAN", "LOAN", BLANK() )Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
1 year agoNot applicable
Hi PBInewbie00 ,
I ceate a table as you mentioned.
Then I think you can create a new calculated column.
Column =
SWITCH(
TRUE(),
'Table'[PRODUCT] = "Cash" && 'Table'[CODE] = "ASST", "CASH",
'Table'[PRODUCT] = "Assets" && 'Table'[CODE] = "ASST", "ASST",
'Table'[PRODUCT] = "Commission" && 'Table'[CODE] = "COMM", "COMM",
'Table'[PRODUCT] = "Derivatives" && 'Table'[CODE] = "DERIV", "DERIV",
'Table'[PRODUCT] = "Cash" && 'Table'[CODE] = "DERIV", "CASH",
'Table'[PRODUCT] = "Cash" && 'Table'[CODE] = "LOAN", "CASH",
'Table'[PRODUCT] = "Loans" && 'Table'[CODE] = "LOAN", "LOAN",
BLANK()
)
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.