cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Relationship activation needed

I have the isseu that I want to create a relation ship, however I can not make this relation ship active because there are other relations that obstruct.

 

I would like to share a sample pbix with you, but I don't know how to do this.

So I will try explain it:

 

I have the following tables:

Schermafbeelding 2018-01-14 om 00.03.36.pngSchermafbeelding 2018-01-14 om 00.04.02.pngSchermafbeelding 2018-01-14 om 00.04.22.png

 

 

Active single relationships:

- 'table 1' (representative) and 'table 3' (customer list)

- 'table 3' (customer list) and 'table 2' (visit list)

 

 

And I want to create something like the following report page:

 

Schermafbeelding 2018-01-14 om 00.18.53.png

 

The map will show the customers and the linked visit notes. 

In the bar chart on the top of the page I would like to count all visit reports per reason of visit, however some of these visit reports are with potential customers and do not have a customer code yet. 

 

So I would like to make a bar chart that counts all visit reports per reason of visit. And a map that only shows the customers that have a customer code and is linked with the visit notes. 

 

I hope this explanation is clear enough, but please ask if more information is needed.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User IV
Super User IV

Re: Relationship activation needed

Probably could use USERELATIONSHIP, see article here:

https://msdn.microsoft.com/en-us/library/hh230952.aspx

 

You could create a measure like:

Measure = CALCULATE(COUNT('Visit list'[Visit date]),USERELATIONSHIP('Representative list'[Representative],'Visit list'[Representative]))

Also, I may be incorrect but it would appear to me that you could just remove the relationships between 'Representative list' and 'Customer list' and your filtering should flow through.


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

View solution in original post

5 REPLIES 5
Super User IV
Super User IV

Re: Relationship activation needed

Generally, you can share a PBIX file using OneDrive or Box or other cloud-based storage. Often, you can fix relationship issues through counseling. However, that's never worked for me personally and hence the two divorces. So, if that doesn't work, you can try chaning relationships from bi-directional to uni-directional. If that will not work, then use the USERELATIONSHIP function.


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Anonymous
Not applicable

Re: Relationship activation needed

Hi @Greg_Deckler

 

Thank you for your reply. 

Tried counseling, but did not work.

 

All my relation ships are uni-directional:

Knipsel.PNG

 

Can you elaborate on the USERELATIONSHIP function?

 

Now the count bar chart in my previous post only counts the visits which have a customer code, because of the active relationships. I want to let it count all visit reports per representative.

Can this be done with USERELATIONSHIP?

 

 

Super User IV
Super User IV

Re: Relationship activation needed

Probably could use USERELATIONSHIP, see article here:

https://msdn.microsoft.com/en-us/library/hh230952.aspx

 

You could create a measure like:

Measure = CALCULATE(COUNT('Visit list'[Visit date]),USERELATIONSHIP('Representative list'[Representative],'Visit list'[Representative]))

Also, I may be incorrect but it would appear to me that you could just remove the relationships between 'Representative list' and 'Customer list' and your filtering should flow through.


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

View solution in original post

Anonymous
Not applicable

Re: Relationship activation needed

Hi @Greg_Deckler

 

Thank you very much for the measure. It works!

 

Of course I can delete the other relationships, however this was only a samle report. In my report I have other things that require that relationship.

 

 

Super User IV
Super User IV

Re: Relationship activation needed

Ah, got it. Glad it works!


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors