0

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 ?

3
  • Small sample dataset in markdown format with expected results would be useful. Commented Aug 31, 2023 at 7:18
  • | Platform | Domain | Product | Component | AVG | |------|--------|--------|------|-------| | PDP | Legacy | basa | A | 6,99 | | PDP | Legacy | basa | C | 4 | | PDP | truc | bizi | F | 8 | | PDP | truc | pegase | A | 20,25 | | PDP | truc | pegase | C | 6,75 | | PDP | truc | pegase | D | 10,13 | | CCDP | Care | campus | A | 13,38 | | CCDP | Care | Med | A | 1,36 | | CCDP | Care | Med | B | 4,6 | | CCDP | Cure | Med | C | 6,63 | | CCDP | Cure | Med | D | 0,9 | Commented Aug 31, 2023 at 9:53
  • The expected results is a matrix visual with Platform-domain-product-component levels in rows and the average value in values Commented Aug 31, 2023 at 9:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.