Forum Discussion

mellolu's avatar
mellolu
Frequent Visitor
5 years ago
Solved

AVERAGE AGE with repeted values

Hi everybody, how can I calculate average age when in a table the same person appears more than once?  
  • Icey's avatar
    5 years ago

    Hi mellolu ,

     

    Based on the measure AlB provided, you can also create a measure like so:

    Avg Age =
    CALCULATE (
        AVERAGEX ( DISTINCT ( 'Table'[Name] ), CALCULATE ( MIN ( 'Table'[Age] ) ) ),
        ALLSELECTED ( 'Table' )
    )
    

     

    Best regards

    Icey

     

    If this post helps, then consider Accepting it as the solution to help other members find it faster.