Click here to Skip to main content
15,886,578 members
Articles / Artificial Intelligence
Tip/Trick

Intelligent Workbook for Generating Basic DAX Formulas used for Time Series Analysis of Measures

Rate me:
Please Sign up or sign in to vote.
4.75/5 (3 votes)
22 Aug 2014CPOL1 min read 9.1K   188   5  
Intelligent workbook for generating time series DAX

The Problem

Assume you have a lot of measures - Gross Sales, Net Sales, Guest Counts, Discount Amounts, etc.

Image 1

You need to now generate DAX for time series analysis against these measures, i.e., week to date, month to date, prior year comparisons, etc.

The realization is that the time series DAX queries for the measures would be similar regardless of the measure.

Solution

So, instead of manually having to re-write DAX queries from scratch for each time series analysis, for that measure, this workbook will take basic information about the measure as input and then output the time series dax.

Image 2

The intelligent spreadsheet uses pre-programmed formulas to output the DAX queries in a different tab. See sample outputs below for the Total Gross Sales (TGS) measure.

Image 3

Disclaimer

I've attached the "intelligent" workbook for use. This is a work in progress. If some of the formulas are not right, please feel free to update it once it's generated. And send suggestions to me so that I can make the workbook smarter. I would advise you use the queries generated as a starting point for writing your own, instead of relying on it as final.

Also, there are hidden tabs in the workbook that are used for calculations. You can unhide those if you want to go under the hood.

Again thanks. I'm looking forward to suggestions.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead
United States United States
I'm a developer, blogger and all around technology enthusiast. He writes and stays abreast with the latest innovative ideas, news, and trends.

Comments and Discussions

 
-- There are no messages in this forum --