Calculate a field % of total May 29, 2020, 04:54:14 AM Hi Guys,I have made a web app using PHPRad, and need to report on the % a field value compared to the sum of all the field values..e.g.Table:IDProcessValue1ArcSpray102Machine53ArcSpray124ArcSpray205Machine246ArcSpray347ArcSpray100I want to find the percent (%) that ArcSpray is compared to the total in relation to the values. the simple math is, SUM (Values WHERE Process = ArcSpray) / SUM (Values) * 100 = %I have done this in excel and access (via multiple queries)RESULT:ProcessPercent of TotalArcSpray86.27Can someone please help how I may be able to get this done? Quote Selected
Re: Calculate a field % of total Reply #1 – May 29, 2020, 10:46:13 AM @Matt_NMS your query should look like this.Code: [Select]SELECT ((SELECT SUM (Values) FROM table WHERE Process = 'ArcSpray') / SUM (Values)) * 100 FROM tableNote: this was not tested. the best way to get a good query is to test it while you modify it. Quote Selected 2 Likes
Re: Calculate a field % of total Reply #2 – June 03, 2020, 02:39:10 AM THanks, i'll have some more goes at it this week hopefully. Quote Selected