Skip to main content

DAX Language - Data Analysis Expression



The DAX language was created specifically for the handling of data models, through the use of formulas and expressions. DAX is used in several Microsoft Products such as Microsoft Power BI, Microsoft Analysis Services and Microsoft Power Pivot for Excel.

Below are the types of Dax functions 

1. Aggregate 
2. Date and time
3. Filter
4. Financial 
5. Information 
6. Logical
7. Maty and trig
8. Other
9. Parent and child
10. Relationship Management 
11. Statistical 
12. Table manipulation 
13. Text
14. Time intelligence 

From the above list of functions 3 types of functions are basic and commonly used, those are Aggregate , Logical and Date and time.


Other important entities which are used with the above function are as follows 

1. Operators 
Example -  ( ), + , Not, &, =, < >, ||

2. Statements 
Define , Evaluate,  Order by, Return, Var

3. Data Types
Binary, boolean,  Currency,  date time, decimal, integer, String , Variant.


In crude language DAX is an advanced version of Excel formulas.
DAX contains similar formulas as in Excel. With dax functions you can filter the data according to specific conditions as we do it with slicers and filter we do in excel.
In DAX data is stored in tabular format. 
There are two Primary calculation you can create using DAX 
1. Calculated column
It means formulas written in columns 

2. Measures 
Formulas written in the area below table.
A formula used to manipulate data is called a measures. 


Advice - I have worked in many automation projects and used Dax functions for past 3 years. While working don't limit your thought process to what you know think what you want i.e the final result. If you don't know the formula but you have a basic idea of the end result then you are on track just search on google and you will get the answers.



Comments

Popular posts from this blog

Charts - Make your data presentable

One-click charts are easy: Select the data and press  Alt+F1 . What if you would rather create bar charts instead of the default clustered column chart? To make your life easier, you can change the default chart type. Store your favorite chart settings in a template and then teach Excel to produce your favorite chart in response to  Alt+F1 . Say that you want to clean up the chart above. All of those zeros on the left axis take up a lot of space without adding value. Double-click those numbers and change Display Units from None to Millions. To move the legend to the top, click the + sign next to the chart, choose the arrow to the right of Legend, and choose Top. Change the color scheme to something that works with your company colors. Right-click the chart and choose Save As Template. Then, give the template a name. (I called mine ClusteredColumn.) Select a chart. In the Design tab of the Ribbon, choose Change Chart Type. Click on the Templates folder to see the template that ...

What if Analysis

Sometimes, you want to see many different results from various combinations of inputs. Provided that you have only two input cells to change, the Data Table feature will do a sensitivity analysis. Using the loan payment example, say that you want to calculate the price for a variety of principal balances and for a variety of terms. Make sure that the formula you want to model is in the top-left corner of a range. Put various values for one variable down the left column and various values for another variable across the top. From the Data tab, select What-If Analysis, Data Table.... You have values along the top row of the input table. You want Excel to plug those values into a certain input cell. Specify that input cell for Row Input Cell. You have values along the left column. You want those plugged into another input cell. Specify that cell for the Column Input Cell. When you click OK, Excel repeats the formula in the top-left column for all combinations of the top row and left colum...

Find Largest Value in Excel

MAXIFS One of the new Office 365 functions added in February 2016 is the MAXIFS function. This function, which is similar to SUMIFS, finds the largest value that meets one or more criteria: You can either hard-code the criterion as in row 7 below or point to cells as in row 9. A similar MINIFS function finds the smallest value that meets one or more criteria. While most people have probably heard of MAX and MIN, but how do you find the second largest value? Use LARGE (rows 2 and 3) or SMALL (rows 4 and 5). What if you need to sum the top seven values that meet criteria? The orange box below shows how to solve with the new Dynamic Arrays. The green box is the  Ctrl+Shift+Enter  formula required previously.