Forum Discussion

SEPA's avatar
SEPA
Frequent Visitor
4 years ago
Solved

calculate average from calculated measure

Dear Experts, I have data like below,   country level stage target actual stage actual avg level actual avg country actual avg   spain lvl1 stg1 1327 4585 345.60% 229.11% 115....
  • Jihwan_Kim's avatar
    4 years ago

    Hi,

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

     

     

     

    Country avg: =
    AVERAGEX (
        ADDCOLUMNS (
            FILTER (
                SUMMARIZE ( ALL ( 'Table' ), 'Table'[COUNTRY], 'Table'[LEVEL] ),
                'Table'[COUNTRY] = MAX ( 'Table'[COUNTRY] )
            ),
            "@levelavg", [Level avg:]
        ),
        [@levelavg]
    )