Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Agpretty20
New Member

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 7
Ashish_Mathur
Super User
Super User

Hi,

Share some data, explain the question and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-xiaoyan-msft
Community Support
Community Support

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.

Radhika2605
Helper II
Helper 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

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. 

BANU
Helper I
Helper 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 ?

amitchandak
Super User
Super 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]))

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 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.