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.
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…