What is DAX?
Data Analysis Expressions (DAX) is a formula expression language used in Analysis Services, Power BI, and Power Pivot in Excel. It is a programming language that is used throughout Microsoft Power BI for constructing calculated columns, measures, and custom tables. It is a compilation of functions, operators, and constants that can be utilized in a formula, or expression, to calculate and return one or more values.
You can easily alter your data model by using DAX to solve a number of calculations and analysis problems.
DAX in Power BI:
DAX formulas are very handy in BI tools like Power BI as they help data analysts to use the data sets, they have to the deepest potential.
With the help of the DAX language, analysts can discover different ways to calculate data values they have and come up with creative insights. It is really very easy to generate smooth reports in Power BI with just few knowledge of BI software and by using functionalities of Data importing, functionalities and visualization.
DAX Recap in 2022
There are number of changes takes place in year 2022. Various new functions were added in the list of DAX functions. Here is a list of few that were added in 2022:
Let’s talk in brief about these functions:
Returns the number of whole working days between start_date and end_date. Working days exclude weekends and any dates identified in holidays. Use NETWORKDAYS to calculate employee benefits that accrue based on the number of days worked during a specific term.
NETWORKDAYS ( <start_date>, <end_date> [, <weekend>] [, <holidays>]
#DAX #Functions #NETWORKDAYS
Converts the records of a table into a JSON text.
#TOJSON #DAX #PowerBI #Analytics
Returns a table as a string in CSV format. It converts the records of a table into a CSV (comma-separated values) text.
TOCSV(, [MaxRows], [Delimiter], [IncludeHeaders])
#TOCSV #BI #POWERBI #ANALYTICS
Return the value of the first argument and also log the value in DAX evaluation log. This function is fully functional in Power BI Desktop only. It acts as a simple passthrough function in other environments.
EVALUATEANDLOG(<Value>, [Label], [MaxRows])
#EvaluateAndlog #Analytics #PowerBI #DataScience
Retrieves a range of rows within the specified partition, sorted by the specified order or on the axis specified.
WINDOW ( from[, from_type], to[, to_type][, <relation>][, <orderBy>][, <blanks>][, <partitionBy>] )
#DAX #Window #POWERBI #Analytics #SQL
The columns used to determine how to partition the data. Can only be used within a Window function. It defines the columns that are used to partition a window function’s parameter.
PARTITIONBY ( <partitionBy_columnName>[, partitionBy_columnName [, …] ] )
The columns and order directions used to determine the sort order within each partition. Can only be used within a Window function.
ORDERBY ( <orderBy_columnName>[, <order>][, orderBy_columnName [, <order>]] [, …] )
Retrieves a single row from a relation by moving a number of rows within the specified partition, sorted by the specified order or on the axis specified.
OFFSET ( <delta>[, <relation>][, <orderBy>][, <blanks>][, <partitionBy>] )
#Offset #BI #POWERBI #SQL #DAX
Returns a row at an absolute position, specified by the position parameter, within the specified partition, sorted by the specified order. If the current partition can't be deduced to a single partition, multiple rows may be returned. It Retrieves a row at an absolute position (specified by the position parameter) within the specified partition sorted by the specified order or on the axis specified.
INDEX(<position>[, <relation>][, <orderBy>][, <blanks>][, <partitionBy>])
#INDEX #POWERBI #DAX #Analytics
To sumup this blog Power BI file is attached for your quick reference. Where you can easily explore all the defined functions!!
Hope you Enjoy!! And Happy learning!!!