Forum Discussion
ArashZ
5 years agoHelper I
Average based on some specific rows
Hi, I have a table like this: Each user ID has the course name of base and advanced and the duration is the same for each user based on their course name. In fact, for user A, the duration for th...
CNENFRNL
5 years agoCommunity Champion
ArashZ
5 years agoHelper I
CNENFRNLThanks. But is there a way to write a calculated column or measure for that?
- CNENFRNL5 years agoCommunity Champion
Avg = SUMMARIZECOLUMNS( COURSE[user ID], COURSE[Course name], "Avg", AVERAGEX( COURSE, COURSE[Start finish duration] ) ) - PaulOlding5 years agoSolution Sage
If you want a measure then it'll need to create the equivalent of the Table.Distinct(Source) table on the fly.
Average Measure =AVERAGEX(SUMMARIZE('Table', 'Table'[Course name], 'Table'[user ID], 'Table'[Start finish duration]),'Table'[Start finish duration])