Calculating a Linear Extrapolation (or Trend) in DAX | by Salvatore Cagliari | Dec, 2024


Calculating a trend helps us recognize if our business is heading in the right direction. While other programming languages can offer built-in functionalities to calculate this, DAX doesn’t, and we must do it on our own.

Towards Data Science
Photo by Adam Nowakowski on Unsplash

Once upon a time, a client asked me to calculate a linear extrapolation of his data to show the trend based on past data.

This is halfway between descriptive and predictive analytics, as it doesn’t employ Machine learning or AI techniques.

It will not account for seasonality or other influencing factors in the data.

The method described here uses the existing data and linearly calculates the extrapolation for all subsequent months, quarters, or other periods.

Let’s look into it.

Using the well-known Contoso retail Data (Source in the References Section below), I want to analyze the number of Customers buying products from my company.

Assuming that the current date is April 2022, I see the following data for the first quarter of Sales in…

Recent Articles

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here