0% found this document useful (0 votes)
17 views12 pages

Dax query

Dax query

Uploaded by

Afiya Sheikh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
17 views12 pages

Dax query

Dax query

Uploaded by

Afiya Sheikh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 12
DAX Introduction > What is DAX? Data Analysis Expressions are a collection of functions that can be used to perform a taskand return one or more values. It means, calculations mostly use functions to generate the results. ‘+ DAXis designed for enhancing data modelling, reporting and analytics capability. simplest level, DAX in Power BI is used for 2 things: > Calculated columns > Calculated measures. Blank DAX Introduction Whole Number Decimal Number PAX Pata Type + InDAX, its possible to define the data type for each column Boolean based on your requirement. = * The appropriate data type improves the performance and Date reduce the size of a data model. Currency Date y y v ¥ DAX Function Category There are more than 200 DAX functions. There are 9 categories in the DAX function. ‘Aggregation functions ‘Aggregation functions return a scalar value applying an aggregation function toa column or to an expression evaluated by iterating a table expression. Date and Time functions ‘Date and time functions help creating calculations based on dates and time, Filter functions ‘Filter functions manipulate table and filter contexts. Information functions + Information functions provide information about data type or filter context of the argument provided. Logical functions * Logical functions act upon an expression to return information about the values or sets in the expression. v y y =o, + DAX Function Category ‘Math and Trig functions ‘The mathematical functions in DAX are very similar to the Excel mathematical and trigonometric functions. Parent-child functions + These functions helps flattening a parent-child relationship in a regular one. Relationships management functions + These functions manage and manipulate relationships between tables. Table manipulation functions ‘These functions manipulate and return tables. Text functions + Text functions manipulate strings. Time intelligence functions + Time intelligence functions support calculations to compare and aggregate data over time periods, supporting days, months, quarters, and years. DAX Introduction > Components of DAX Data Model Data + Adate model consists of data, calculations and formatting Tables rules and it combines to create an object. Coens * This object helps to explore and understand the dataset. Relationships Measures Hierarchies DAX Parameter Names > DAX has standard parameter names to facilitate the usage and understanding of the DAX functions. > ‘Tounderstand the syntax of the DAX functions and to use data values appropriately for the relevant DAX function parameters, tis important to understand DAX parameter naming conventions. DAX Parameter Names Parameter Name & Description Expression : Any DAX expression that returns a single scalar value, where the expression Is to be evaluated multiple times (for each row/context). Value : Any DAX expression that retums a single scalar value where the expression is to be evaluated exactly once before all other operations. Table : Any DAX expression that retuns a table of data tableName: The name of an existing table using standard DAX syntax. it cannot be an expression. columnName: The name of an existing column using standard DAX syntax, usually fully Qualified. It cannot be an expression. Name : A string constant that will be used to provide the name of a new object. Order: An enumeration used to determine the sort order. Type : An enumeration used to determine the data type for Path tem and PathitemReverse, DAX Functions - Description Structure ‘What is the DAX function and how and where to use it. > Syntax DDAX function name is given in UPPERCASE letters. AX function name is followed by opening parenthesis, Each parameter follows standard DAX parameter naming convention and is enclosed in angle brackets. Ifa parameter is optional, itis further enclosed in square brackets. ‘The parameters are separated by commas. Elipses are used to show an optional number of repetitions of parameters. The function syntax ends with closing parenthesis. DAX Functions - Description Structure What is the DAX function and how and where to use it > Syntax ‘Standard te at fog ' ‘ Optional i SELECTCOLUMNS( ,,, [( expression>)]--he, i mee i : i Se, a oak 5 " T “Opening # Optional No.of 4 Parenthesis 1 Repetitions me] {,, Row context = Row context can be thought of as “the current row.” = The row context consists of the values in each individual row and values in columns that are related to the current row. > Filter context = The filter context filters data. = It is the set of values allowed in each column, based on filter constraints that were applied to the row or that are defined by filter expressions within the formula, ee) DAX Context Name ‘Amount ad country ohn rm @ Tove 28 Nz John sa a Tevor 7 co avina 36 ux Sith om on Name Amount Paid | Country John ai 4 Taylor 2433 Nz eo ohn oA oz Taylor 678 Nz Marina 396 Uk ‘Smith 3113 ® Marina UK 3112 DAX Context Rows Context.) Rows Context-2

You might also like