Forum Discussion
Anonymous
Jul 20, 2017Table Relationship
Hello I have a table in powerpivot data model two tables linked to each other through a one to many relationship. the link is dne through the key "Role" In the one side table I have put two colums ...
Wyn Hopkins
Jul 21, 2017MVP
Hi Imed
When you say you can't implement this do you mean it won't let you join the 2 tables together?
When you say you can't implement this do you mean it won't let you join the 2 tables together?
- AnonymousJul 21, 2017
Yes exactly.
what I want to to do is as follow
in table 1 I have a column specifying different roles
Table 2 is defining the role and the type of P&L ( profit and Lost)
I am interested only by some roles for instance
Role_name P&L
Role 1 Entity
Role 2 entity
Role 3 entity
and I would like to specify all other roles should be destination
how to do this.
thank you for your support.
regards,
- Wyn HopkinsJul 21, 2017MVPYou will need to list all roles and state each one is Destination. Any roles not mapped will show as Blank
One option would be to do the mapping using Merge Queries in Power Query and then replace all the nulls with Destination- SergeiBaklanJul 21, 2017Diamond Contributor
Another option is - if Table1 defines known roles with second column named "Descr", into Table2 we may add column like
=VAR MyDescr = CALCULATE(VALUES(Table1[Descr]),FILTER(Table1,Table1[Role]=Table2[Role])) RETURN IF(ISBLANK(MyDescr),"Destination",MyDescr)
Relationship between Table1 and Table2 is not required. Not sure about perormance, depends on how big the model is.