Forum Discussion
Peavey
Helper III
6 years agoAverage of colums in Direct Query
In import mode I just make a new column with the average calculation, but now in Direct Query I cannot use average when making a expression for a new column. What is the best approach to acheive this...
amitchandak
Super User
6 years agoPeavey , You have to think the same in terms of measure.
In case it is simple Avg
Avg Measure = Average(Table[A])
If that was a calculation at the row level , try like
Avg Measure = AverageX(Table,Divide(Table[A],Table[B]))
- Peavey6 years ago
Helper III
amitchandakclose but not quite.
I have 10 rows I need to average. Tried your solution and it works on fex. 2 rows. But when trying all 10, I get the error message: Internal error: An expression services limit has been reached. Please look for potentially complex expressions in your quesry, and try to simplify them.
Any ideas?
- amitchandak6 years ago
Super User
- Peavey6 years ago
Helper III
amitchandakthere are 10 tables with 62 rows.
One row is one week. I need the average on each week from each table.