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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
sreddy47652
Helper II
Helper II

Merging two different columns based on selection

Hi Team, I have two seprate columns like Fee payment(No Payment required-Single event, One of Payment, Not applicable, other), Amount fields. When i select in dropdown as other i want to concatanate other+Amount(It should show like "Other 50$") same way when i select Fee payment as "one of payment" it should show only "one of payment"(No concatation required). How to concate two columns based on drop down selection in power bi, i need only concatanate when user select as other.

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @sreddy47652 ,

 

Whether the advice given by @johncolley  has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.


Looking forward to your feedback.


Best Regards,
Henry

View solution in original post

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @sreddy47652 ,

 

Whether the advice given by @johncolley  has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.


Looking forward to your feedback.


Best Regards,
Henry

johncolley
Solution Sage
Solution Sage

Hi @sreddy47652 , You can accomplish this using the SWITCH function in a new column, please see an example below:

 

Combined = 
var paymenttype = 'Column condition merge'[Fee Payment]
var amount = 'Column condition merge'[Amount]
var result =  SWITCH(
    TRUE(),
    paymenttype = "Other", COMBINEVALUES(" - ", paymenttype, amount),
    paymenttype)
    Return
    result
johncolley_0-1662695704649.png

 

If this answer solves your problem please mark it as a solution!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.