Forum Discussion
Creating a column using 3 other columns
Hello, hope everyone is keeping safe and well.
I have 3 columns, only one of which is populated when a transaction takes place. I am trying to create a column (not in Power Query) that combines those results. So for example,
TRANS1 TRANS2 TRANS3 My desired column
Banana Banana
Grape Grape
Pineapple Pineapple
Kiwi Kiwi
I hope that makes sense, I'm certain I'm missing a very obvious function but I can't see the wood for the trees on this one.
I hope someone can help me create my desired column!
Thank you in advance 🙂
4 Replies
- Greg_DecklerCommunity Champion
A DAX way of doing it:
Column = SWITCH(TRUE(), NOT(ISBLANK([TRANS1])),[TRANS1], NOT(ISBLANK([TRANS2])),[TRANS2], NOT(ISBLANK([TRANS3])),[TRANS3] )- AnonymousNot applicable
This is an excellent solution!
Thank you so much 🙂
- Greg_DecklerCommunity Champion
Seems like you should unpivot those columns in Power Query.
- amitchandakSuper User
Anonymous , Try a new column like
coalesce([TRANS1],[TRANS2],[TRANS3])