I have a data table that has the following columns: (work week), (condition pass), (team). There are multiple rows of the same work week, where each row is an instance of a condition passing or failing (1 or 0) and each row is associated with a team. There are multiple teams.
I want to plot the % of "condition pass" per week, where % of condition pass = sum of "condition pass per week"/count of teams/week.
My challenge is getting the "% of condition pass" by week and plot it by week. Everytime I add a new week (multiple rows of data for a week) to the data set, the values from the previous weeks change. How do I fix this problem?