Forum Discussion
aktripathi2506
9 years agoHelper IV
Calculating measure
Hi, Week Item Count of Item avg sale for that item 1 121 46 133 1 122 1 57 1 123 6 54 1 124 12 96 1 125 26 66 1 126 11 114 1 127 53 135 1 128 ...
parry2k
9 years agoSuper User
Add new column in your table and o get sum of the average, something like this:
my average column = var myItem = myTable[Item] var myCount = CALCULATE(COUNT(myTable[Item]), FILTER(ALL(myTable),myTable[Item] = myItem)) var mySum = CALCULATE(SUM(myTable[Sale]), FILTER(ALL(myTable),myTable[Item] = myItem)) return DIVIDE(mySum,myCount,0)
try this and see if this works. We would have done it in few lines but try to be more detailed.
we can add another column for count as well.
Thanks,
P