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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
PRADEEPJAAN
New Member

RATING WISE EMPLOYEE COUNT

Hii Guys,
       I have one challange in my project.I want emp Rating wise emp count. If am select rating 1 in slicer i want to show in  card that show emp count of rating 1 employees.
Here is the sample data

EMP CODERATING

1001

1
10022
10031
10045
10053
10062
10074
10085
10091
10104
10113
1 ACCEPTED SOLUTION
grazitti_sapna
Super User
Super User

Hi @PRADEEPJAAN,

You can achieve this by creating a DAX measure that counts the number of employees based on the selected rating in the slicer.

Solution: Create a Measure

Use the following DAX formula:

Emp Count by Rating = 
VAR SelectedRating = SELECTEDVALUE('Table'[RATING])
RETURN
CALCULATE(
COUNT('Table'[EMP CODE]),
'Table'[RATING] = SelectedRating
)

Steps to Implement:

  1. Load your data into Power BI.
  2. Create a slicer using the RATING column.
  3. Create a card visual and apply the Emp Count by Rating measure.
  4. Now, when you select a rating in the slicer, the card will show the count of employees with that rating.

Expected Output:

  • Selecting Rating = 1 in the slicer → The card will show 3 (employees: 1001, 1003, 1009).
  • Selecting Rating = 2 → The card will show 2 (employees: 1002, 1006).
  • And so on…

🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
🔗 Curious to explore more? [Discover here].
Let’s keep building smarter solutions together!

View solution in original post

2 REPLIES 2
pradeepnani
Frequent Visitor

Hi, 
to achieve the rating wise count you can use this measure 

Rating Wise count=
var select=selectedvalue(tablename[rating])
var result=If(select,calculate(tablename[employee code]))
return
result

grazitti_sapna
Super User
Super User

Hi @PRADEEPJAAN,

You can achieve this by creating a DAX measure that counts the number of employees based on the selected rating in the slicer.

Solution: Create a Measure

Use the following DAX formula:

Emp Count by Rating = 
VAR SelectedRating = SELECTEDVALUE('Table'[RATING])
RETURN
CALCULATE(
COUNT('Table'[EMP CODE]),
'Table'[RATING] = SelectedRating
)

Steps to Implement:

  1. Load your data into Power BI.
  2. Create a slicer using the RATING column.
  3. Create a card visual and apply the Emp Count by Rating measure.
  4. Now, when you select a rating in the slicer, the card will show the count of employees with that rating.

Expected Output:

  • Selecting Rating = 1 in the slicer → The card will show 3 (employees: 1001, 1003, 1009).
  • Selecting Rating = 2 → The card will show 2 (employees: 1002, 1006).
  • And so on…

🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
🔗 Curious to explore more? [Discover here].
Let’s keep building smarter solutions together!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.