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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Strongbuck
Helper I
Helper I

How do I create a list of companies when there are mutliple joins

I am trying to create a chart that counts the number of issues by company for about 10 projects.  I need help understanding how to gather the data I need. 

 

Issues can be assigned to a user, company, role or left blank.  There are two columns (Assignee_Type and Assignee_ID) in the issues table.

 

Assignee_Type can be one of the three values (user, company and role) or not populated.  The Assignee_ID field refers to different tables depending on which type it is associated to.

 

The tables are:

Issues_Issues = List of issues.  This table contains the Assignee_Type and Assignee_ID fields.

Admin_project = Project data (ProjectID and Name)

Admin_companies = Company data (CompanyID and Name)

Admin_project_user_companies = project company user relationship (ProjectID, UserID, CompanyID)

Admin_user = User data (UserID,  First Name, Last Name)

Admin_user_role = user role relationship (UserID, RoleID)

Admin_role = (RoleID and Name)

Admin_project_user_role = project user role relationship (ProjectID, UserID and RoleID)

 

The role relationship is the most complicated.  I need to identify the role, then gather all of the users and then their assigned companies.

 

I plan on using a project drop down for the top level filtering because I want all 10 projects represented when the chart loads.  It's the gathering of the data into one column I don't know how to do in DAX.

 

I know how to accomplish this in SQL but not DAX.  Any suggestions are welcomed.  Thanks for your time!

 

1 REPLY 1
Strongbuck
Helper I
Helper I

So 43 people reviewed this but not one person replied.  Can someone please give me some guidance here?  Can you at least tell me what DAX statements I should utilize?

 

I'm assuming I need to use IF statements with a Lookup?  Maybe Filter?  Selectcolumns and a filter?  Please tell me what DAX statements I should use!

 

If Power BI supported SQL, I would be finished already.  I miss my joins and where clauses especially for logic like this!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors
Top Kudoed Authors