Forum Discussion
Diptarup
4 years agoHelper II
Additional Measure to be defined
I have this below table for which, I need to determine the average value per Product category based on the country. I am able to get the values using the below measure . But I am getting stuck when I...
Diptarup
4 years agoHelper II
Kindly check my above post all the measures are now given there. Pasting below for you benefit.
MAX-Year = MAX('Table'[Year])
Criteria = VAR categoryNumber = If('Table'[Sub - Category]="E1"||'Table'[Sub - Category]="E2"||'Table'[Sub - Category]="E3","-",VALUE(RIGHT('Table'[Sub - Category],LEN('Table'[Sub - Category])-1)))
RETURN
SWITCH(TRUE(),
categoryNumber<=4, "C1",
categoryNumber<=8, "C2",
categoryNumber<=12,"C3",
BLANK()
)
Rolling Global Average = Var tble= SUMMARIZE(FILTER('Table','Table'[Year]='Table'[MAX-Year]),'Table'[Country],"AVG",SUMX(VALUES('Table'[Product Name]),AVERAGE('Table'[Value])))
Return AVERAGEX(tble,[AVG])