Forum Discussion
Create a new column from other column
Dear all,
I have a table with many millions of rows and I want to extract a data master to connect it with the budget table.
The DAX formula is:
KIT CATEGORY=
DISTINCT(
SELECTEDCOLUMNS(
KIT;
"COUNTRY"; KIT[COUNTRY];
"PRODUCT";KIT[PRODUCT];
"TYPE"; KIT[TYPE]
)
)
But an error message appears related to the relationship:
Apologies because it's in Spanish.
Thank you to everybody!!
modifying data source is the best solution ever 🙂
do not hesitate to give a kudo to useful posts and mark solutions as solution
12 Replies
- az38
Community Champion
- az38
Community Champion
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
- jlarques
Helper V
same error, but don't worry. I'll try to put it in another way. I thought was easier to get the data from another table to have a master.
Thanks again for all your help! I'm going to fight with this issue and I'll publish the solution if I find it!
Regards,
José Luis