Forum Discussion
Create a new column from other column
so, jlarques
as i understand it works without type column because each product in your data source has the only category.
but when you add "type" column, you get a few rows with the same product and category but with different types
as you have a many-to-one relations it became impossible, because many product from Kit table have relations with many products from Kit Category
for my point, the best solution is to create in Kit table calculated column
SurrogateKey = concatenate('Table'[Product];concatenate('Table'[Category];'Table'[Type]))
then try to build a master table:
KIT CATEGORY=
DISTINCT(
KIT[SurrogateKey]
)
and create a relationship many-to-one by this SurrogateKey field
do not hesitate to give a kudo to useful posts and mark solutions as solution
Linkedin
Hi az38
thanks for your quick answer.
When I try to create a calculated column on the KIT CATEGORY table, the Concatenated formula cannot show me any table, only the KIT CATEGORY fields, so, I cannot add other external columns from the KIT table.
Any ideas?
Thanks again.
- az386 years ago
Community Champion
no, you should create calculated column in Kit table, in your origin. then create distinct by this new column
do not hesitate to give a kudo to useful posts and mark solutions as solution
Linkedin- jlarques6 years ago
Helper V
When I create a new column with the DISTINCT formula, an error appears with this text:
"A table of several values ​​was provided, where a single value was expected".Thanks again!
- az386 years ago
Community Champion
jlarques are you sure you do everything correct? maybe you have an empty cells in one of columns?
and be sure, your new table has is defined as
KIT CATEGORY = DISTINCT( KIT[SurrogateKey] )do not hesitate to give a kudo to useful posts and mark solutions as solution
Linkedin