Others

How to Create DAX Measures for Weekly Player Totals and Category Averages

Amos GikundaAmos Gikunda Oct 29, 2026 871 views

Question details

The user needs to calculate weekly total values per player and then compute the average of these weekly totals grouped by category using DAX formulas.

How to Calculate Weekly Player Totals and Category Averages Using DAX
Product
Power BI / Excel
Device & OS
not provided
Scenario
Creating custom DAX measures to analyze hierarchical tabular data involving players, categories, and weekly periods.
Observed behavior
A specific DAX formula structure is required to preserve the week and category filter context while iterating over players to accurately calculate the category average.
Before you start

Ensure your dataset is formatted as a proper table with dedicated columns for Values, Player names, Categories, and Week Start Dates before creating your DAX formulas.

Solution 1Recommended

Create SUM and AVERAGEX DAX Measures

Use the SUM function to calculate the weekly total, then nest it inside an AVERAGEX function to compute the category average across the distinct players.

DAX measures evaluate based on the filter context of your report visuals. To calculate an average of aggregated totals, you must first define the base total measure, and then use an iterator function like AVERAGEX.

AVERAGEX will calculate the average at the player level while keeping the surrounding category and date contexts completely intact.

1
Create the Weekly Total Measure

In your Power BI or Power Pivot model, create a new measure using the formula: Weekly Total = SUM(Data[Value]). Replace 'Data' and 'Value' with your actual table and column names.

2
Create the Category Average Measure

Create a second measure to calculate the average across players using the iterator function: Category Weekly Average = AVERAGEX(VALUES(Data[Player]), [Weekly Total]).

3
Build Your Visual

Add a Matrix or Table visual to your report workspace. Drag the 'Week Start Date' and 'Category' fields into the visual's rows or columns, and drop your new 'Category Weekly Average' measure into the values area to evaluate the context correctly.

Create SUM and AVERAGEX DAX Measures
Filter Context Tip: Using VALUES(Data[Player]) inside the AVERAGEX function ensures that DAX specifically iterates through each unique player within the current category and week, preventing distorted averages.
Free Microsoft Office alternative

Analyze Data Seamlessly with WPS Spreadsheet

While DAX is highly specific to the Microsoft Power BI and Power Pivot ecosystems, WPS Office provides robust, free spreadsheet tools to perform similar data summarization. You can easily calculate weekly totals and category averages using standard PivotTables and advanced formulas without the steep learning curve of DAX.

  1. 1. Open Your Dataset: Launch WPS Spreadsheet and open your tabular data file.
  2. 2. Insert a PivotTable: Navigate to the Insert tab and click on 'PivotTable' to generate a dynamic summary.
  3. 3. Configure the PivotTable: Drag 'Category' and 'Week Start Date' into the Rows area, and 'Value' into the Values area. Adjust the Value Field Settings to summarize by Average where necessary.
Fully compatible with Microsoft Excel file formats (.xlsx, .csv).Create powerful PivotTables to summarize player totals and category averages effortlessly.Lightweight software with a familiar, easy-to-navigate interface.Free alternative for comprehensive daily data analysis and visualization.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my DAX average calculating incorrectly across categories?

This usually happens when the filter context is not properly defined. If you use a standard AVERAGE function instead of AVERAGEX, it will average every single row in the dataset rather than averaging the aggregated player totals. Ensure you are iterating over the player column using AVERAGEX(VALUES(Table[Column]), [Measure]).

Can I calculate the player totals and category averages in a single DAX measure?

Yes, you can use variables (VAR) within a single measure. You would define a variable for the summation and then use the RETURN keyword for the AVERAGEX evaluation, though creating separate measures is often recommended for easier reusability in other visuals.

Does WPS Spreadsheet support DAX formulas?

WPS Spreadsheet supports standard Excel functions, array formulas, and advanced PivotTables for data analysis. However, it does not natively support the Data Analysis Expressions (DAX) language or the Power Pivot data modeling engine.

What does the VALUES function do in this DAX formula?

The VALUES function returns a one-column table of unique values from the specified column (in this scenario, the players). This instructs the AVERAGEX function exactly which unique entities to iterate over when calculating the average of the weekly totals.