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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
saron
Frequent Visitor

Overlapping Conditions

that is the sample data of how I want my data to look like

 

Company (New column)Brand (from Table A)Supplier_Code (from Table B)
AACity1111
BBCity1111
BBMAMA2222
CCMAMA3333
CCCity3333

 

i have two tables Table A is table of Brand (with column of Brand name and article code) and table B is table of Supplier (with column of Supplier_Code and article code). I want to create new calculated column Company which can be use in slicer for vasulization. The following is my DAX formula, but it is not working. It only returned the value for AA and the value for BB is ignored. Is there anyway to work this overlapping condition in DAX function? Thanks

Company = 
Switch(
True(),

Supplier[SUP] = "1111", "AA",
Supplier[SUP] = "1111", "BB")




1 REPLY 1
v-yueyunzh-msft
Community Support
Community Support

Hi, @saron 

 According to your sample data , you want to return the "AA" and "BB" when the [Brand] = "City" and [Supplier_Code]= "1111" . 

It is impossible to judge by purely IF and SWITCH methods. Because only one value is allowed to be returned for a value that satisfies a certain condition.

 

I don't quite understand your specific logic for obtaining AA and BB, but if you want to return two different values for the same condition, the only way is to add another column, add the corresponding judgment, and then return the corresponding value according to the situation.

 

If you still can't solve your problem, you can describe the specific logic of your return, and can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!

 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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