Forum Discussion
Creating Relationship between 2 Different Datasets
- 2 years ago
Hi Anonymous - you can append these three sheets (Ara,Ken and Eva) into a single table named as Owner
Rename columns appropriately for consistency (e.g., Name of the Pet to Pet Name, Pet to Animal).
create a relationship between owner table and Animal tables as lik below
create a new table as
OwnerMapping =
DATATABLE (
"Owner", STRING,
{
{ "Ara" },
{ "Ken" },
{ "Eva" }
}
)Now create individual measure for each owner
Ara_Pets =
CONCATENATEX (
FILTER (
Owner,
Owner[Owner] = "Ara" &&
Owner[Animal] = SELECTEDVALUE ( AnimalInfo[Animal])
),
Owner[Pet Name],
", ",
"n/a"
)Ken_Pets =
CONCATENATEX (
FILTER (
Owner,
Owner[Owner] = "Ken" &&
Owner[Animal] = SELECTEDVALUE ( AnimalInfo[Animal])
),
Owner[Pet Name],
", ",
"n/a"
)Eva_Pets =
CONCATENATEX (
FILTER (
Owner,
Owner[Owner] = "Eva" &&
Owner[Animal] = SELECTEDVALUE ( AnimalInfo[Animal])
),
Owner[Pet Name],
", ",
"n/a"
)Hope it works
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!! - 2 years ago
Hi Syeena,
I found it much easier to achieve the desired result using Power Query and a matrix table. This method eliminates the need for DAX functions.
You can download the PBIX file from this link: [Download PBIX File](https://drive.google.com/file/d/1o6uTVY-O_wELcH4-6rK0Lr1Gr6Lo-eqT/view?usp=sharing).
Best regards,
Hi Syeena,
I found it much easier to achieve the desired result using Power Query and a matrix table. This method eliminates the need for DAX functions.
You can download the PBIX file from this link: [Download PBIX File](https://drive.google.com/file/d/1o6uTVY-O_wELcH4-6rK0Lr1Gr6Lo-eqT/view?usp=sharing).
Best regards,
- Anonymous2 years agoNot applicable
thank you so much! this is very helpful