Forum Discussion

AThomasCF's avatar
AThomasCF
Frequent Visitor
2 years ago
Solved

I'm try to generating Average Values based by location code and graph the results

Hello there. The upshot is that we send product out for testing. We are trying to trend out what values we get from each location so that we have general ideas what we are getting.   Here is a mode...
  • AThomasCF's avatar
    AThomasCF
    2 years ago

    After some tinkering, I figured out what was wrong: I was getting a pure sum of all values without an average. I needed to divide the sum by the count of each time the location appeared and that got what I had calculated previously using Excel

     

    Here is my final code:

    = AVERAGEX(VALUES('Table'[Location#]),CALCULATE(SUM('Data'[Value 1])/COUNT('Table'[Location#])))