Forum Discussion

PRADEEPJAAN's avatar
PRADEEPJAAN
New Member
1 year ago
Solved

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 ...
  • grazitti_sapna's avatar
    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:

    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!