Forum Discussion

dunnno's avatar
dunnno
New Member
4 years ago
Solved

Calculate an average value from a filtered column

I've got a "PickupThePhone" SP list in which users enter their name /when / what about / etc when they pick up the phone.   I'd like to be able to get an average per day / week a specific user (let...
  • goncalogeraldes's avatar
    goncalogeraldes
    4 years ago

    You could do with the following:

     

    Answered Calls =
    VAR _total =
        CALCULATE ( COUNTA ( 'PickupThePhone'[ID] ) )
    VAR _filtered =
        CALCULATE (
            AVERAGEX (
                KEEPFILTERS ( VALUES ( 'PickupThePhone'[Date] ) ),
                COUNTA ( 'PickupThePhone'[ID] )
            ),
            'PickupThePhone'[UserName] = "Jim"
        )
    RETURN
        DIVIDE ( _filtered, _total, 0 )

     

    Or by adding the filter directly to the visual. Your choice! 🙂

     

    Hope this answer solves your problem!
    If you need any additional help please @ me in your reply.
    If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
    Thanks!

    You can also check out my LinkedIn!

    Best regards,
    Gonçalo Geraldes