Power BI average of averages of averages DAX measure

94 Views Asked by At

I have datas seems like this :

example data

We have to calculate the averages of the column "value", however we have to follow the rule : "all component have the same weight in a product, all product have the same weight in a domain, and all domain have the same weight in a platform. The goal is to have some table like this : Goal

So, I have to do average of the averages of products to have the Domain view. I tried a lot of things in dax but nothing work since product level ...

I tried averagex with temp table but I don't know why this doesn't work.

Doesn't work

measure = VAR comp = SUMMARIZE('table','table'[Platform],'table'[Domain],'table'[product_id],'K8S deployments'[component_name],"K1",CALCULATE(AVERAGEX('table',[Value])))
VAR prod = SUMMARIZE(comp,[Platform],[Domain],[product_id],"K1P",AVERAGEX(comp,[K1]))
VAR dom = SUMMARIZE(prod,[Platform],[Domain],"K1D",AVERAGEX(prod,[K1P]))
VAR plat = SUMMARIZE(dom,[Platform],"K1P",AVERAGEX(dom,[K1D]))
return AVERAGEX(plat,[K1P])

Can you help me please ?

0

There are 0 best solutions below