Forum Discussion
Using Inactive Relationship to Fill Gaps in Data
Anonymous add a new column like this as an example for a vendor.
In my example, the Customer represents your Contract Header table and the Table represents your data table.
Vendor 1 =
VAR __vendor = RELATED ( Customer[Vendor] )
VAR __vendorIfBlank =
IF ( COALESCE( __vendor, "" ) = "",
MAXX (
Customer,
CALCULATE (
MAX ( Customer[Vendor] ),
USERELATIONSHIP ( Customer[Column1], 'Table'[Col2] )
)
),
__vendor
)
RETURN __vendorIfBlank
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
I tried it, and I was unable to use COALESCE so I just used ISBLANK instead. This is what happened when I tried it:
- Anonymous5 years agoNot applicable
I changed my data table titles to match your use of them
- Anonymous5 years agoNot applicable
Hi Anonymous,
For your scenario, I think it may cause the 'circular dependency' reference issue due to the two relationships(activated and inactivated) mapping conflict.
In my opinion, I'd like to suggest you use all functions to ignore the filter and manually apply the filter to your expressions, it may avoid the 'circular dependency' issue.
Managing “all” functions in DAX: ALL, ALLSELECTED, ALLNOBLANKROW, ALLEXCEPT
Regards,Xiaoxin Sheng
- Anonymous5 years agoNot applicable
how so?