Forum Discussion
Condition column includes multiple values in one cell
Hi Anonymous thanks for providing solution.
I am still trying to understand the query you have, looks like you have to create a lookup table which is customer id and then use that as a lookup value for another query? I still don't know how it will apply to my case. For example, for the below table, what I want to achieve is for the Company Name column, I want to be able to have the company name assigned based on the company ID in the Relationship column. Currently I use DAX containsstring which only assign one company name for each cell although there could be multiple company ID in the relationship company column. Any ideas how to go about this?
| Relationship Company | Company Name |
| 1 | Etsy |
| 1,2 ,3 | Etsy, Amazon, Apple |
| 3,4,5 | Apple, Oatly, Ford |
| 2,3,6 | Amazon, Apple, Toyota |
| 1,2,3,4,5,6 | Etsy, Amazon, Apple, Oatly, Ford, Toyota |
How would you like to find the company name? Is your company ID column and company name column in the same table, the data you provided may seem incomplete, can you provide some more detailed example data?
Best Regards!
Yolo Zhu
- goldenfisherman2 years agoFrequent Visitor
hi Anonymous yes. the company ID column and company name column should be the same table. Basically, I want to create a calculated "Company Name" column which multiple conditions based on the company ID column, however, if the containsstring I currently have, it only give one value (company name) in each cell. Meanwhile, in the company ID column, there could be multiple IDs. For example, 1,2,3 or 3,5,6, I want the campany name column to have Etsy,Amazon,Apple or Apple, Ford, Toyota instead of just one company name.
Thanks so much for your help!
- Anonymous2 years agoNot applicable
Can you provide some sample data so that can provide more suggestion for you
Best Regards!
Yolo Zhu