Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Apply Functions to a Simple Metric

Example: Rounding the average test score to two decimal places.

Take the average test score and apply the round(x, p) function, setting the precision p equal to 2.

round([Average: Test Score], 2)

Compare two or more Metrics

Example: Student-Teacher ratio.

The number of students divided by the number of teachers. Distinct counts must be used here if the data contains more than one row per student or teacher.

[Distinct Count: Student ID] / [Distinct Count: Teacher ID]

Example: Determine the proficiency level of the average score.

Compare the average score of the 1st essay submission to what the desired proficiency level (e.g. 4). Then use an if (cond, trueValue, falseValue) block to return the text "Below" if the average score is less than 4, or to return "Above" if the score is equal to or greater than 4.

profLevel = 4;

if ([Average: Essay 1st Submission Score] < 4,
    "Below",
    "Above"
);

Use a Comparison to Create a Textual Result

Example: Indicate "Low", "Medium", and "High" Student-Teacher ratios.

Use a variable to record the student-teacher ratio. Then set variables to mark the points at which the ratio is considered medium or high. Finally, use two if (cond, trueValue, falseValue) blocks to return the "Low", "Medium" or "High" text based on the ratio value.

stRatio = [Distinct Count: Student ID] / [Distinct Count: Teacher ID];
mediumThreshold = 20;
highThreshold = 40;

if (stRatio < mediumThreshold,
    "Low",
    if (stRatio >= highThreshold,
        "High",
        "Medium"
    )
)

Example: Indicate whether the proficiency level has "Improved", remained "Unchanged", or "Got Worse" from the first essay submission compared to the most recent.

Use a variable to set the desired proficiency level (e.g. 4). Then create two variables, before and after which indicate the proficiency level of the 1st essay submission and most recent submission, respectively. Finally, use nested conditional blocks to return "Improved" if the proficiency went from "Below" to "Above", "Unchanged" if it remained the same, or "Got Worse" if it went from "Above" to "Below".

profLevel = 4;

before = if ([Average: Essay 1st Submission Score] < profLevel,
    "Below",
    "Above"
);

after = if ([Average: Essay Most Recent Score] < profLevel,
    "Below",
    "Above"
);

if (before  == "Below" && after == "Above", 
    "Improved",
    if (before == "Above" && after == "Below",
        "Got Worse",
        "Unchanged"
    )
)
  • No labels