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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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