Forum Discussion
Unable to use second inactive user relationship
Hello , Having trouble with 2nd userelationsip, Seek assistance Below is the first userelationship which is working without any issue CALCULATE(COUNTA(vw_MSR_CC_ChangeReport[Change number]),USERELATIONSHIP(vw_MSR_CC_ChangeReport[Planned start date],'Date-Hirarchy'[Date])) The Problem is when I add 2nd inactive userelationship it contradicts the first one CALCULATE(COUNTA(vw_MSR_CC_ChangeReport[Change number]),USERELATIONSHIP(vw_MSR_CC_ChangeReport[Planned start date],'Date-Hirarchy'[Date]),USERELATIONSHIP(vw_MSR_CC_ChangeReport[Assignment group],vw_MSR_Task_Tbl[Assignment group]))
7 Replies
- amitchandakSuper User
Agpretty20 , Can this type of measure works for you
CALCULATE(COUNTA(vw_MSR_CC_ChangeReport[Change number]),USERELATIONSHIP(vw_MSR_CC_ChangeReport[Planned start date],'Date-Hirarchy'[Date]))
+
CALCULATE(COUNTA(vw_MSR_CC_ChangeReport[Change number]),USERELATIONSHIP(vw_MSR_CC_ChangeReport[Assignment group],vw_MSR_Task_Tbl[Assignment group]))- Agpretty20New Member
Hello Amit,
Thank you for reaching out with a possible solution. The calculation you provided will not work , it will add those additional numbers. Please let me know if we can try anything else! Thanks!
Regards,
-Alicia
- BANUHelper I
Hi Amit,
Tried this but unfortunately it is the same,
Only 1 Userelationship works , While Second is working , it contradicts the first one
Any other way to activate the 2nd Inactive userelationship ?
- Radhika2605Helper II
Hi Alicia,
Could you please provide more details on what issues are you experiencing ? If no data is being returned by the measure then can you please check if there is data which obeys both the relationships and filters applied on the report?
If there is any error being thrown then can you please provide screenshot of the error?
Thanks
Radhika
- Agpretty20New Member
Hi Radhika,
We are having trouble building multiple relationships between tables. Its stated that you can have 10 inactive relationships but we are only able to do 1 inactive relationship and the 2nd inactive relationship is not working. I will gather more details and follow up with you. Thank you so much for responding.
- AnonymousNot applicable
Hi @Agpretty20,
To help you better, we may need more details from you.
As you said above, ”The Problem is when I add 2nd inactive userelationship it contradicts the first one”. How exactly does it show up and does it have detailed error reporting information?
What kind of relationship exists between table ‘Bvw_MSR_CC_ChangeReport’ ,’ vw_MSR_Task_Tbl’ and’Date-Hirarchy’?
In USERELATIONSHIP, the status of a relationship is not important; that is, whether the relationship is active or not does not affect the usage of the function.
but if any column named as an argument is not part of the relationship or the argument belongs to a different relationship, an error is returned.
If multiple relationships are needed to join table A to table B in a calculation, each relationship must be indicated in a different USERELATIONSHIP function.
For more information, please see: userelationship-function-dax
If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any confidential Information.
Hope it helps,
Caitlyn Yan
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
- Ashish_MathurSuper User
Hi,
Share some data, explain the question and show the expected result.