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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

A problem of how many 'companies' have how many 'users'?

Hi, I have a list of user IDs and their companies and I need to know, how many companies have how many users. Expected result looks like this: (4 companies have each only 1 userID, 2 companies have 2 users in total and 2 companies have 3 users in total.)

 

count.png

 

and my data is a list of user IDs and Companies. It looks like this:

 

Company

UserID
A1
A2
A3
B4
B5
C6
D7
E8
F9
G10
G11
G12
H13
H14

 

I have a hard time even naming this problem and searching the internet for it. 🙂 Could you help in DAX or PowerQuery?

 

And a bonus question is creating data segments like: How many companies have between 1-2 users in total? How many have 3-5 users in total? Again plotting in in a chart like following:

 

count.png

 

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

Powerbi won't let you put a measure on the axis so you could create a summary table e.g. 

TableE = SUMMARIZECOLUMNS( TableP[Company], "countOff", COUNTROWS(TableP)) 

which will allow you to put countOff on the axis and COUNT of Company in the Values.

---------------------

The 2nd part is a binning solution.  You can create a calculated column in the new summary table or use the binning features

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-grouping-and-binning 

View solution in original post

1 REPLY 1
HotChilli
Super User
Super User

Powerbi won't let you put a measure on the axis so you could create a summary table e.g. 

TableE = SUMMARIZECOLUMNS( TableP[Company], "countOff", COUNTROWS(TableP)) 

which will allow you to put countOff on the axis and COUNT of Company in the Values.

---------------------

The 2nd part is a binning solution.  You can create a calculated column in the new summary table or use the binning features

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-grouping-and-binning 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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