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

Countrows where a single value (of possible multiple values) appears in a column

I have two tables, 'Offices' and 'Projects'.

 

'Offices' has the list of all offices within the department. 'Projects' has a list of all projects worked on in the Department, which may be assigned to more than one office:

Project NameFiscal YearOffice AssignedProject Type
A2020Hiring, FinanceL
B2021FinanceT
C2021Finance, AdvertisingT
D2020Advertising, HiringL

 

I would like to generate a count of each project type assigned to each office, when then a slicer could break down into fiscal years:

OfficeT ProjectsL Projects
Hiring 1
FInance2 
Advertising11

 

In Excel, I would do a "countifs" function in each cell, but I don't see that working in BI. If I just do a matrix using [Office names] in 'Offices' and [Project Type] in 'Projects', it works, except that there's one row without an office name that contains the count of all projects where more than one office was assigned.

 

Thanks!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@amanda_wahlig , You have split the office column into rows. So either do in this table or create a new table and do there

 

Split by rows in power query https://www.tutorialgateway.org/how-to-split-columns-in-power-bi/

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@amanda_wahlig , You have split the office column into rows. So either do in this table or create a new table and do there

 

Split by rows in power query https://www.tutorialgateway.org/how-to-split-columns-in-power-bi/

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.