Forum Discussion

LeoQ's avatar
LeoQ
Icon for Helper I rankHelper I
5 years ago
Solved

Averages with small multiples charts

Hi everybody! I have been trying to solve this for days, but I couldn't find a solution. I have a measure that calculates the average amount of mails answered by agents for day. With that informatio...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi LeoQ ,

    You can create a measure as below to get it, please find all the details in the attachment.

    Conditonal formatting = 
    VAR _averageofperday =
        CALCULATE (
            AVERAGE ( 'Table'[Value] ),
            FILTER (
                ALLSELECTED ( 'Table' ),
                'Table'[Date] = SELECTEDVALUE ( 'Table'[Date] )
            )
        )
    VAR _averageofperagent =
        CALCULATE (
            SUM ( 'Table'[Value] ),
            FILTER (
                ALLSELECTED ( 'Table' ),
                'Table'[Date] = SELECTEDVALUE ( 'Table'[Date] )
                    && 'Table'[AGENT] = SELECTEDVALUE ( 'Table'[AGENT] )
            )
        )
    RETURN
        IF ( _averageofperagent < _averageofperday, "red", "green" )

    Best Regards