Forum Discussion
adbm
1 year agoHelper I
Mean value not calculated correctly
Hi, I have a table with ~24K rows of invoice data of various vendors. Im trying to add a calculated column to find the average of a column called 'Days to Payment' by vendor. So for every row, i ...
Selva-Salimi
1 year agoSolution Sage
Ok, then rewrite it as follows:
CALCULATE(Sum('Vendor data'[Days to Payment]),filter('Vendor data','Vendor data'[Name] = earlier('Vendor data'[Name]))) / CALCULATE(count('Vendor data'[Days to Payment]),filter('Vendor data','Vendor data'[Name] = earlier('Vendor data'[Name])))
If this post helps, then I would appreciate a thumbs up 👍 and mark it as the solution to help the other members find it more quickly.
adbm
1 year agoHelper I
- Selva-Salimi1 year agoSolution Sage
please go to Direct query, refresh your data and filter this table to the "Name" that was shown on the previous image you shared and then share that data. I am sure that the problem is not in formula. it might be in your data.