<< Go back to all functions

DVAR

The DVAR function in Google Sheets is a powerful tool to calculate the variance of a population sample selected from a database table-like array or range using a SQL-like query. Whether you're analyzing data in a database or spreadsheet, the DVAR function simplifies the task. Dive into our comprehensive guide to master its application.

Function Syntax and Parameters

Syntax: DVAR(database, field, criteria)

Parameters:

  • database: The range of cells that makes up the database table array or range.
  • field: The column or field containing the data points to consider in the database.
  • criteria: The range of cells that contains the SQL-like query or condition to apply to the database.

Step-by-Step Tutorial

  1. Using DVAR to calculate variance:

    • Example: =DVAR(A1:C10, "Salary", "Department='Sales'")
    • Result: The function will calculate the variance of the salaries in the "Sales" department.
  2. Using DVAR with a larger criteria range:

    • Example: If A1:B10 contains the database table and D1:D2 contains the criteria range, then =DVAR(A1:B10, "Units Sold", D1:D2) will calculate the variance of the "Units Sold" data points that meet the criteria.

Use Cases and Scenarios

  1. Sales Analysis: Calculate the variance of sales figures within specific criteria.
  2. Salary Analysis: Determine the variance of salaries within different departments.
  3. Stock Performance Analysis: Calculate the variance of stock prices within specific time periods.

Related Functions

  • VAR: Returns the variance of a population sample selected from a database table-like array or range.
  • DVARP: Returns the variance of a population sample selected from a database table-like array or range using a SQL-like query.

Related Articles