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
Vlad_M_
Frequent Visitor

Counting blanks in a Company > Department > Item relationship

Hi

 

I've ran into the following issue. I have a table for Companies, Departments and Items.

 

Items both have a Company and Department column. All items has a company, but they don't necessarily have a department.

Companies might have items with departments and without departments attached.

 

Like so:

Companies

ID

 

Departments
ID
CompanyID

 

Items
ID
CompanyID
DepartmentID

 

I want to showcase a donut chart, where a count of all items for each department are displayed for a company. When showing a summed chart of all companies, it counts the items with "blank" in department and shows them as "(Blank)"-department, I guess since there still is a relationship to the company - BUT - when I try to show the same chart for a single company, I don't get any results when a company doesn't have any departments, or if the items are "blank" in their "DepartmentID".

 

How could I make a statement something like:

"Get all items in a company for each department, if DepartmentID is empty count the item as a "(Blank)" department"

 

I hope my issue makes sense, any help would be greatly appreciated - thanks!

1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @Vlad_M_ ,

Please check if this file helps:

vcgaomsft_0-1668478623280.png

relationships:

vcgaomsft_1-1668478708948.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

2 REPLIES 2
v-cgao-msft
Community Support
Community Support

Hi @Vlad_M_ ,

Please check if this file helps:

vcgaomsft_0-1668478623280.png

relationships:

vcgaomsft_1-1668478708948.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Hey Gao

 

It was exactly what I meant! Thanks!

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.