Forum Discussion
SEPA
4 years agoFrequent Visitor
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....
- 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] )
Jihwan_Kim
Super User
4 years agoHi,
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]
)
- SEPA4 years agoFrequent Visitor
Thank you it works as expected