AndieB Posted February 4, 2009 Share Posted February 4, 2009 Hi all, I need some help learning doing math calculation, hopefully you guys here can help me out. How do you make a TOTAL percentage correctly calculated if the TOTAL percentage is based on lets say 5 other average percentage. Example: I have five (5) tables, lets call the T1 through T5. In each table, I have five (5) rows, lets call these R1 through R5. Each row, states only TRUE or FALSE. So, it could look like this: T1: R1=FALSE, R2=TRUE, R3=TRUE, R4=FALSE, R5=TRUE So in order to calculate the percentage of HOW many are in status TRUE, the calculation would be made like this: 3 ROWS have value TRUE. So, 3 divided by 5 (number of total ROWS) will equal 0,6, which is 60%. Now, for the rest of the tables it could look like this: T1 = 60% T2 = 60% T3 = 80% T4 = 20% T5 = 0% If I now want to give an overall percentage for all the tables percentage values, HOW do I do the math for that? Is it as simple as (60+60+80+20+0)/5 ?? Anyone got some feedback about this? Thanks in advance, Andreas Quote Link to comment https://forums.phpfreaks.com/topic/143778-help-with-math/ Share on other sites More sharing options...
Maq Posted February 4, 2009 Share Posted February 4, 2009 If none of the tables are a weighted percentage, which it looks like they aren't, then yes, you are correct. Quote Link to comment https://forums.phpfreaks.com/topic/143778-help-with-math/#findComment-754334 Share on other sites More sharing options...
AndieB Posted February 6, 2009 Author Share Posted February 6, 2009 If none of the tables are a weighted percentage, which it looks like they aren't, then yes, you are correct. Excuse my lack of knowledge, but what is weighted percentage? Sincerely, Andreas Quote Link to comment https://forums.phpfreaks.com/topic/143778-help-with-math/#findComment-755816 Share on other sites More sharing options...
Maq Posted February 6, 2009 Share Posted February 6, 2009 As in: A) 1/5 = 20% B) 20 /100 = 20% They both equal 20% but B would have a higher weight. Even if they're the same numbers you can have one section weighted higher than the next. In your case it seems that you don't want weighted percentages, your all have the same numbers. Quote Link to comment https://forums.phpfreaks.com/topic/143778-help-with-math/#findComment-755938 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.