Forum Discussion

mrbajana's avatar
mrbajana
Icon for Helper III rankHelper III
5 years ago
Solved

Cients over Month Average

I have the Fact table and the date dimension and make the average Per Month of transactions per employee, so I need help in determining which employees are above the average.
A measure that returns true if it is above the monthly average of 5.41 or 0 if it is below the monthly average of transactions per employee.

 

Thanks

  • Hey mrbajana ,

     

    try something like this:

    Above Average =
    VAR vAverage = CALCULATE( AVERAGE( myTable[_PromCaj] ), ALLEXCEPT( myDate, myDate[Month] ) )
    RETURN
        IF( AVERAGE( myTable[_PromCaj] ) > vAverage, TRUE(), FALSE() )

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
     
    Best regards
    Denis
     

     

1 Reply

  • selimovd's avatar
    selimovd
    Icon for Most Valuable Professional rankMost Valuable Professional

    Hey mrbajana ,

     

    try something like this:

    Above Average =
    VAR vAverage = CALCULATE( AVERAGE( myTable[_PromCaj] ), ALLEXCEPT( myDate, myDate[Month] ) )
    RETURN
        IF( AVERAGE( myTable[_PromCaj] ) > vAverage, TRUE(), FALSE() )

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
     
    Best regards
    Denis