Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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) |
AA | City | 1111 |
BB | City | 1111 |
BB | MAMA | 2222 |
CC | MAMA | 3333 |
CC | City | 3333 |
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(),
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
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |