Forum Discussion
sureddy1
9 years agoNew Member
dax group by measure
I have a table over which i need to calculate average of a column grouped by multiple columns. I am able to create a table using below: GROUPBY(tableA,tableA[groupbyA],tableA[groupbyB],"AvgColum...
- 9 years ago
Hi sureddy1,
You can create a measure like below:
Measure = CALCULATE(AVERAGE(Table1[Amount]),FILTER(ALLSELECTED('Table1'),'Table1'[Group]=MAX('Table1'[Group]) && 'Table1'[Year]=MAX('Table1'[Year])))
You can download attached .pbix file to have a look.
Best Regards,
Qiuyun Yu
abhiiimr15
6 years agoFrequent Visitor
On Similar lines, i need to calculate the avg. score.
| SurveyID | Parameter | SubParameter | Question | Score | ScoreatSubParameterlevel | |||||
| 1 | 1 | 1 | Q1 | 2.67 | 1.8 | |||||
| 1 | 1 | 1 | Q2 | 1 | 1.8 | |||||
| When I do avg. of Score on Power BI Chart then avg score on Power BI shows 1.5 and not 1.8. Not sure why |
Please could any one help on the above scenario. Why does Power BI calculate the wrong avg. for SubParameter=1 .