Data forecasting using DAX functions

Data forecasting using DAX functions

Introduction and Data Loading

In this section, Raj introduces the topic of forecasting data using Dax and explains that it involves writing a logical function based on historical records. He then proceeds to demonstrate the process with an example.

Loading Data

  • Click "Open" to load the data.
  • Load all the tables.
  • Click "Load" to complete the loading process.

Understanding the Data

Raj provides an overview of the loaded tables and highlights that the main table is "Sales Detail," while others are lookup tables.

Sales Details

  • The sales details range from January 2015 to August 2019.
  • The goal is to forecast sales for September, October, November, and December.

Creating Measures for Total Sales

Raj explains how to create measures for total sales and forecasting data using Dax functions.

Total Sales Measure

  • Create a measure named "Total Sales."
  • Set it equal to the sum of sales in the "Sales Detail" table.

Creating Measure for Forecasting

Raj demonstrates how to create a measure specifically for forecasting data based on previous year's values.

Total Sales Forecast Measure

  • Create a measure named "Total Sales Forecast."
  • Use conditional logic to calculate total sales forecast:
  • If there are blank values in sales details' total sales, calculate total sales for the same period last year from the calendar table.
  • Calculate total sales by considering both sales state and blank values in sales details' total sales.

Visualizing Results

Raj shows how to visualize the forecasted results using a table visual and explains the importance of establishing relationships between tables.

Table Visual

  • Select the "Calendar" table and add the "Sales State" and "Month" columns.
  • Add the "Total Sales" measure to display the forecasted sales values.
  • Note that there is no direct relationship between the calendar and sales detail tables, so a relationship needs to be established based on the common factor, "Sales State."

Obtaining Forecasted Results

Raj confirms that forecasted results for September, October, November, and December 2019 are now available based on previous year's data (2018).

Total Sales Forecast

  • The forecasted results are derived from 2018 September, October, November, and December sales data.

Conclusion

Raj successfully demonstrates how to forecast data using Dax functions. By creating measures for total sales and forecasting based on historical records, users can obtain valuable insights into future sales trends.

Turn any video into a summary like this

YouTube links, meetings, lectures. With transcripts, search, and chat.