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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
GLT_BI
Frequent Visitor

Count of items per average result

I have a table that shows the evaluation results (results range from 1 to 10) of 2 diferent skills in an organization.

GLT_BI_4-1666582611317.png

 

I need to get the average result per employee and then group those results with the following outcome criteria:

< 3.4 = Bad

< 6.7 = Ok

< 9 = Good

<= 10 = Excellent

 

To do so, I need a table with the average result per employee and the outcome per average result:

GLT_BI_5-1666583620824.png

 

Then, I just count each outcome, getting the desired result table as follows:

GLT_BI_7-1666584703893.png

 

The problem is that this result should also be affected by Slicers for the [Area] and the [Skill] filters. So, for example if I filter by [Skill]="Fast" and [Area]="Talent Care", the result table should actually be the following:

GLT_BI_9-1666584809632.png

 

This is a small sample of a much larger file with several Areas and Skills evaluated, and I would like to know what percentage of people did good, ok or bad on average, either with or without filters. What I described is the mental process that I use for the desired result table, but I don't know how to get it done, hopefully somebody can help me figure it out.

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood correctly your question, but please check the below picture and the attached pbix file whether it suits your requirement.

 

Jihwan_Kim_1-1666595055099.png

 

 

Jihwan_Kim_0-1666595031815.png

 

 

Expected result measure: =
VAR _avgperemp =
    ADDCOLUMNS (
        DISTINCT ( Data[Employee] ),
        "@avg", CALCULATE ( AVERAGEX ( Data, Data[Result] ) )
    )
RETURN
    IF (
        HASONEVALUE ( Outcome[Outcome] ),
        COUNTROWS (
            FILTER (
                _avgperemp,
                [@avg] >= MAX ( Outcome[Min] )
                    && [@avg] <= MAX ( Outcome[Max] )
            )
        )
    )

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

2 REPLIES 2
GLT_BI
Frequent Visitor

@Jihwan_Kimthis is exciting, my first ever post and my question was beautifully answered. Exactly what I needed.

 

Thank you so much!!

Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood correctly your question, but please check the below picture and the attached pbix file whether it suits your requirement.

 

Jihwan_Kim_1-1666595055099.png

 

 

Jihwan_Kim_0-1666595031815.png

 

 

Expected result measure: =
VAR _avgperemp =
    ADDCOLUMNS (
        DISTINCT ( Data[Employee] ),
        "@avg", CALCULATE ( AVERAGEX ( Data, Data[Result] ) )
    )
RETURN
    IF (
        HASONEVALUE ( Outcome[Outcome] ),
        COUNTROWS (
            FILTER (
                _avgperemp,
                [@avg] >= MAX ( Outcome[Min] )
                    && [@avg] <= MAX ( Outcome[Max] )
            )
        )
    )

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.