Forum Discussion

wilfredtsk's avatar
wilfredtsk
Icon for Helper I rankHelper I
8 years ago
Solved

Measure: Displaying "cluster data"

Hi PowerBI pros, need help and advice pls.

Am trying to display chart with clustering of data for performance appraisal, i.e.

 

  • Number of staff which are B performance and above
  • Number of staff which are B- performance and below

I know I need to use measure, but don't know how to go about doing it.

 

Here is the sample data.

STAFF NAME

GRADING

Staff A

B

Staff B

B

Staff C

B

Staff D

B

Staff E

B

Staff F

B+

Staff G

B-

Staff H

B-

Staff I

B+

Staff J

B-

Staff K

B-

Staff L

C

Staff M

C

Staff N

C

Staff O

B+

Staff P

C+

Staff Q

C

Staff R

B-

Staff S

B+

Staff T

A

Staff U

B+

Staff V

B+

Staff W

B-

Staff X

B-

Staff Y

C

Staff Z

B-

  • Anonymous's avatar
    Anonymous
    8 years ago

    wilfredtsk,

    Please replace  the Grade table to your table name in the following DAX.

    B and Higher = CALCULATE( COUNT('Grade Table'[STAFF NAME]), 'Grade Table'[GRADING] in {"A" , "B+", "B" })

    B- and Lower= CALCULATE( COUNT('Grade Table'[STAFF NAME]), 'Grade Table'[GRADING] in {"B-" , "C+", "C" })

    And you can create a chart as shown in the following screenshot.


    Regards,
    Lydia

3 Replies

  • Hi wilfredtsk,

     

    Try to use this measures below:

     

    B and Higher = CALCULATE( COUNT(Grades[STAFF NAME]), Grades[GRADING] in {"A" , "B+", "B" })
    
    B- and lower = CALCULATE( COUNT(Grades[STAFF NAME]), Grades[GRADING] in {"B-" , "C+", "C" })

    Regards,

    MFelix

    • wilfredtsk's avatar
      wilfredtsk
      Icon for Helper I rankHelper I

      Hi MFelix,

       

      Thank you for the speedy reply. It don't seem to work as the grades are highlighted in "red"

      Also, once I have the measure, how can I display it as a chart?

       

      Sorry for the trouble.

       

      wilfredtsk

      • Anonymous's avatar
        Anonymous
        Not applicable

        wilfredtsk,

        Please replace  the Grade table to your table name in the following DAX.

        B and Higher = CALCULATE( COUNT('Grade Table'[STAFF NAME]), 'Grade Table'[GRADING] in {"A" , "B+", "B" })

        B- and Lower= CALCULATE( COUNT('Grade Table'[STAFF NAME]), 'Grade Table'[GRADING] in {"B-" , "C+", "C" })

        And you can create a chart as shown in the following screenshot.


        Regards,
        Lydia