Virtual instrumentation using labview LEARNOVITA

What is Dax in Power BI? | A Comprehensive Guide

Last updated on 28th Jan 2023, Artciles, Blog

About author

Kimaya (Business Analytics Analyst )

Kimaya is the Sr.Business Analytics Analyst with 5+ years of experience. She has expertise in ABC analysis, SPI, Factory Overhead, R&D Capex, sunk cost, economic order quantity (EOQ), and EAC. Her articles assist in sharing information and abilities in core fields and provide students with informative knowledge.

(5.0) | 19887 Ratings 2270
    • In this article you will learn:
    • 1.DAX Basics in Power BI: What is DAX?
    • 2.Importance of DAX in Power BI.
    • 3.DAX in Power BI: How does it work?
    • 4.Power BI DAX Basics: Types of a functions in DAX.
    • 5.Conclusion.

DAX Basics in Power BI: What is DAX?

Functions, constants and operators are used in a DAX to create expressions. In simpler terms, DAX is an advanced version of MS Excel with high-end data manipulation and management capabilities. It is developed by a Microsoft to interact with its business intelligence and data modeling tools like a PowerPivot Power BI.

Some of major advantages of Power BI :

  • A Real-time data visualization.
  • Creation of a charts and report generation on voice command using a Cortana.
  • Large storage space and simple retrieval of a data from the storage.
  • Higher security at a Row level.
  • BI has intuitive user experience features and memorizes a most frequently used trends.

All these functions are an essentially performed by a pre-set tools and commands in a system. But there are few occasions when want to perform a specific type of function says a certain type of a data analysis but you are unable to do so because a command does not pre-exist in the system. What do do in such a case? This is where a DAX comes into picture.

Importance of DAX In Power BI:

DAX is quite an important syntax as working in a DAX improves auser experience by deploying functionalities like a data visualization data importing and manipulating. For a normal report creation a basic knowledge of the dashboard is enough but to be able to build up sophisticated and insightful reports DAX is needed With several commands and measures that can be used under a DAX syntax the reports generated are more intuitive and discerning.

DAX in Power BI: How does it work?

DAX works on the combination of three fundamental concepts:

1. Syntax

2. Context

3. Functions

These inputs are the fundamental to the creation of a specific command that are fetches desired results.

1. Syntax:

Syntax refers to a components of the formula are making. It is the language used in a formula like the command, sign, operators, destination column or row or table etc. For example name, parenthesis, summation, name of a table etc.

2. Context:

Context refers to a target row that has been included in formula for a data retrieval or calculation. Context is present in a two types: Row Context and Filter Context.

3. Functions:

Functions refer to a predefined or already existing commands in a system. For example a Sum a Add a True a False etc.

Features of Power BI

Power BI DAX Basics: Types of a Functions in DAX:

1. Aggregate Functions:

Min: Fetches a minimum value in given column.

Syntax :

  • MIN(<"column">)
  • Example
  • =MIN( [ SellerMargin] )

Mina: Fetches a minimum value along with an Aggregate Functions Logical values and text representation of a numbers if any.


  • MINA( <'column'> )
  • Example
  • =MINA( InternetSales[Freight] )

Minx: Fetches a minimum value after evaluation of every row expression in a given table.


  • MINX ( < table >, <'expression'> )
  • Other functions
  • MAX
  • MAXA
  • MAXX
  • SUM
  • SUMX

2. Count Functions:

Distinctcount: Fetches a count of distinct numbers are avoiding any replication.


  • DISTINCTCOUNT( <'column'> )
  • Example
  • =DISTINCTCOUNT( ProductsList[ProductID] )

Count: Fetches a total count of items even if repetitions are be present.


  • COUNT( <'column'> )
  • Example
  • =COUNT ( [ShipDate] )

Counta: Fetches a count of items in non-empty column.


  • COUNTA( <'column'> )
  • Example
  • = COUNTA( ‘ProductSeller’[Phone] )

Countrows: Fetches a number of rows in given table.


  • COUNTROWS( < table > )
  • Example
  • =COUNTROWS( ‘Enquiries’ )

3. Date-Time Functions :

Date: Fetches a desired date in Date-time format.


  • DATE ( <'year'>, <'month'>, <'day'> )
  • Example
  • =DATE ( 2020,02,27 )

Hour: Fetches hours in a AM PM format.


  • HOUR ( <'datetime'> )
  • Example
  • =HOUR( ‘Orders’ [TransactionTime] )

Today: Fetches a current date.


  • TODAY()
  • Example
  • = YEAR ( TODAY())-2012
  • Other functions
  • NOW
Dax Functions

4. Math Functions:

Abs: Fetches an absolute value.


  • ABS( <'number'> )
  • Example
  • =ABS( [LabelPrice] – [SellingPrice] )

Exp: Fetches an exponent’s value.


  • EXP( <'number'> )
  • Example
  • =EXP( [Power] )

Fact: Fetches a factorial of a given number.


  • FACT( <'number'> )
  • Example
  • =FACT( [Values] )
  • Other functions
  • LN
  • LOG
  • PI
  • SIGN
  • SQRT

5. Logical Functions :

AND: A logical conjunction is performed on two specified expressions.


  • AND( <'logical1'> , <'logical2' > )
  • Example
  • =IF( AND(1<2 , 2<3) , “All true” , “One or false” )

OR: A logical disjunction is performed on two specified expressions.


  • OR( <'logical1' > , <'logical2' > )
  • Example
  • =( IF(OR(1<2 , 2<3) , “All true” , “One or more false” )

NOT: A logical negation is performed on a given expression.


  • NOT( <'logical' > )
  • Example
  • =NOT( [ProductPrices] )
  • Other functions
  • IF

6. Information Functions:

Isblank: Declares whether the value is blank or not as true or false.


  • ISBLANK( <'value'> )
  • Example
  • =IF( ISBLANK(‘CalculatedMeasures’[PreviousYearTotalSales]) ,BLANK() , (CalculatedMeasures’[PreviousYearTotalSales]/ ‘CalculatedMeasures’[PreviousyearTotalSales])

Isnumber: Determines whether a value is a number or not.


  • ISNUMBER(<'value'>)
  • Example
  • =IF( ISNUMBER(2), “Is number”, “Is Not number” )

Isnontext: Determines whether a value is a number or not.


  • ISNONTEXT( <'value'> )
  • Example
  • =IF( ISNONTEXT(“ ”), “Is Non-Text”, “Is Text” )
  • Other functions

7. Text Functions:

Concatenate: This function joins two strings.


  • CONCATENATE( <'text1'> , <'text2'> )
  • Example
  • = CONCATENATE( “Hello” , “Learner” )

Fixed: Rounds a number to the specified decimal.


  • FIXED( <'number'> , <'decimals'> , <'no_commas'> )
  • Example
  • =FIXED( [LabelPrice], 3,1 )

Replace: Replaces a portion of a string with the characters specified.


  • REPLACE( <'old_text'> , <'start_num'>, <'num_chars'> , <'new_text'> )
  • Example
  • =REPLACE( ‘New Services’[Service ID],2,3,”AB” )
  • Other functions


DAX is one of the most widely used expression syntaxes today with a wide range of applications. Learning it opens up several opportunities in the market particularly in SQL-enabled businesses with DAX in Power BI you can create any type of logical expression or formula that you need.

Are you looking training with Right Jobs?

Contact Us

Popular Courses