Forum Discussion
Iamnvt
7 years agoContinued Contributor
Concatenatex Lookupvalue multiple values
hi,
I have 2 tables:
Product
| A |
| B |
| C |
and Sales:
ProductRegion
| A | AA |
| A | BB |
| B | BB |
| C | AA |
I need to write a calculated column that lookupvalue all the Region from Sales Table, and concatenatex the values by "," delimeter.
Expected Result:
| Product | Region |
| A | AA, BB |
| B | BB |
| C | CC |
lookupvalues has error:
Region_ = LOOKUPVALUE(Table2[Region],Table2[Product],Table1[Product])
Expression has the following warning: A table of multiple values was supplied where a single value was expected.
PBI file is here:
https://1drv.ms/u/s!Aps8poidQa5zk6sHt7Go6e8D7qRPUw
Thanks,
You can use CROSSFILTER function to get this column in Table1, if you have the aforesaid relationships
Country = CONCATENATEX ( CALCULATETABLE ( VALUES ( Table3[Country] ), CROSSFILTER ( Table2[Region], Table3[Region], BOTH ) ), [Country], "," )
7 Replies
- Zubair_MuhammadCommunity Champion
Hi
Region_ = CONCATENATEX ( CALCULATETABLE ( VALUES ( Table2[Region] ), Table2[Product] = EARLIER ( Table1[Product] ) ), [Region], "," )- IamnvtContinued Contributor
Thanks very much
Zubair_Muhammad is there any ways that I can concatenatex the lookupvalue formula?
- IamnvtContinued Contributor
what if I don't have physical relationship between the 2 tables; how can I do that?