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
GuestUser
Helper V
Helper V

DAX Query for Grouping

Hi,

 

We have two table Employee and Supervisor

where emp.emp_id = supervisor.supervisor_id (self join type)

 

Now we need report in below format

Employee Count    Supervisor Count

0-5                              10
6-15                             20
16-20                            30

 

Basicaally it will show 10 Supervisors handle a count of  0-5 Employees

 

Any help on how this report can be created .

Tried few measures creation but not able to achieve like above

 

Any suggestios pls

2 ACCEPTED SOLUTIONS

Hi @GuestUser,

 

try this.

PBIX

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


View solution in original post

Hi @GuestUser 

Emp I'd. Supervisor id
1. 11
2. 11
3. 222
4. 222
5. 222
11. 333

Need to cretae a reprot like below
Emp count. Supervisor count
0-2. 3 I assume it should be 2 not 3, right?
3-5. 1

 

Please check whether you'd like to get below results:

7.PNG8.PNG

Pbix attached for your reference.

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

4 REPLIES 4
v-diye-msft
Community Support
Community Support

Hi @GuestUser 

 

Sorry not quite understand your requirement, you might consider creating pbix file that will contain some sample data (remove the confidential info), upload the pbix to onedrive or dropbox and share the link to the file. Please do not forget to describe the expected results based on this sample data.

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Hi

Employee table has below data
Emp I'd. Supervisor id
1. 11
2. 11
3. 222
4. 222
5. 222
11. 333

Need to cretae a reprot like below
Emp count. Supervisor count
0-2. 3
3-5. 1

Number of supervisor who handle 0-2 employees

Any help how to create report pls

Hi @GuestUser 

Emp I'd. Supervisor id
1. 11
2. 11
3. 222
4. 222
5. 222
11. 333

Need to cretae a reprot like below
Emp count. Supervisor count
0-2. 3 I assume it should be 2 not 3, right?
3-5. 1

 

Please check whether you'd like to get below results:

7.PNG8.PNG

Pbix attached for your reference.

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Hi @GuestUser,

 

try this.

PBIX

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


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.

Top Solution Authors
Top Kudoed Authors