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

Relationship issues. I need a single model but it doesn't seem possible. Help?

No, not asking for marriage advice.  My marriage is fine but thanks for checking! 😄

 

I'm having trouble with a complex dataset that doesn't seem to fit the "star" model and I don't really see a way to make it (at any type of scale).  I feel like this is probably a common problem but I haven't been able to find a solution that works for me yet.  Maybe I'm not searching the right terms or am missing the point on something but I need help figuring out how to handle a modeling issue I've run into that is making me question my ability to use a single data model vs having to split it out based on specific ways I need to view the data.

 

Since this is a relatively large and complex SQL database for a CRM/ticketing system, I'll try to focus it on a specific set of the data.  I think if I can solve this piece it will unlock how to actually deal with this everywhere else.

 

At a high level, the data is structured like this:  I have employees ("Employees" table) that work on tickets ("Tickets" table) and projects ("Projects" table) in our system.  They may or may not be assigned to ticket or project and may or not be scheduled ("Schedule" table) on them directly, but they can put time ("Time Entries" table) against them.

 

Here is a sample I mocked up of the tables and their relationships.

Employees.Employee RecID -> Projects.Project Manager RecID (inactive)

Employees.Employee RecID -> Tickets.Assigned Owner RecID (inactive)

Employees.Employee RecID -> Schedule.Employee RecID (inactive)

Employees.Employee RecID -> Time Entries.Employee RecID (active)

Projects.Project RecID -> Tickets.Project RecID (active, not all tickets are associated with a project though)

Tickets.Ticket RecID -> Schedule.Ticket RecID (active, not all tickets have a schedule, not all schedules are tied to a ticket)

Tickets.Ticket RecID -> Time Entries.Ticket RecID (active, not all tickets have a time entry, not all time entries are tied to a ticket)

jyarborough_0-1634077729817.png

 

Other key points:

  • An employee can put a time entry in against tickets they are associated with or schedule on (impromptu escalation).
  • Time can be entered that is not associated with a ticket (lunch break for example).
  • The employee's Manager and Report Card form a hierarchy that is used for reporting on a team or role's performance.

One main goal is to be able to have a slicer or filter on the Manager column and the Report Card column of the Employees table and be able to see the Projects, Tickets, Schedule, and Time Entries for the various employees that match.  Again, this is a very trimmed down version of the different ways we need to slice and view the data but it highlights the problem I have.

 

For example, if I want to show a table with time entries for a specific Manager/Report Card combination, no problem.  If I want to then show all the projects assigned to those employees that match the filter, it breaks because the relationship is inactive.

 

Some things I've thought about or come across:

  • Adding columns/flattening:  I've thought about just adding columns to each table for the specific things I need to filter on but that gets messy and causes confusion.  It doesn't scale well.
  • Combining/flattening:  I've thought about combining things like the Tickets and Projects tables, but again, that doesn't scale well.
  • DAX measures:  I can't filter properly on the measures if I am bringing in the Manager/Report Card.  I've seen things that can alter a relationship or do "on the fly" joins, etc., but I haven't been able to drag Employee.Name, Project.Title, and a total of hours for the Time Entries (for example) into a table and have it work.
  • Bidirectional filtering:  slow and causes other issues.  Doesn't scale well.
  • Bridge tables:  I've tried various combinations of things but can't seem to find a combination that would help.

So I'm basically at the point of thinking I may need one dataset that is focused on Time Entries analysis and another dataset that is focused on Projects analysis.  I don't think that scales well either because then I might need one for Schedule and other perspectives, and this sample doesn't include things like Companies, Contacts, Agreements, Sales Orders, Quotes, Opportunities, etc. that would all be unique perspectives.  It would be a LOT of duplication between the datasets just to get different active relationships based on the way I need to display the data.

 

Any help would be appreciated.  Hopefully I'm just dense and missing a simple concept.

1 REPLY 1
v-yangliu-msft
Community Support
Community Support

Hi  @Anonymous ,

You can use the inactive relationship in the function at the following URL:
https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in-power-bi

https://community.powerbi.com/t5/Desktop/Using-inactive-relationship-for-filtering-purposes/m-p/58450

https://docs.microsoft.com/en-us/dax/lookupvalue-function-dax

https://community.powerbi.com/t5/Desktop/using-inactive-relationship/m-p/513670

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI Show Episode 10 Recap

The Power BI Community Show

Watch the playback when Amit Chandak, a Power BI Super User, demos how to use Field Parameters to make reports more dynamic.

Power BI Dev Camp Session 26

New Date - Check it Out!

Mark your calendars and join us on Thursday, October 6 at 11a PDT for a great session with Ted Pattison!

Health and Life Sciences Power BI User Group

Health and Life Sciences Power BI User Group

Power BI specialists at Microsoft have created a community user group where customers in the provider, payor, pharma, health solutions, and life science industries can collaborate.

Ignite 2022

What's Next at Microsoft Ignite 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Top Solution Authors