Forum Discussion
RATING WISE EMPLOYEE COUNT
- 1 year ago
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:
- Load your data into Power BI.
- Create a slicer using the RATING column.
- Create a card visual and apply the Emp Count by Rating measure.
- 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!
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