DAX in Power BI | Learn Power BI DAX Functions Step by Step


DAX In Power BI – Table of Content

What is DAX?

DAX stands for Data Analysis Expression. It is used for data analysis and calculations. DAX is a collection of functions, operators and constants. All these are evaluated as one formula to get the result. These formulas are very useful in Business Intelligence tools like Power BI. In DAX, complete code is written inside a function. So, it is called a functional language.

A DAX expression that is executable may contain nested functions, conditional statements, value references, etc. DAX formulas have two primary data types: numeric and others. The numeric data types include currency, decimals, etc., whereas others include string and binary objects. In a DAX formula, we can use values of the mixed data types as inputs. The conversion will take place during the time of formula execution automatically. As per your instructions, the output values will be converted into data types. The data scientists can use the data sets in DAX to the fullest. They can discover new ways to calculate data values with the help of DAX. In DAX, expressions are evaluated from the innermost function going to the outer function one by one. 

Become a Power BI Certified professional by learning this HKR Power BI Training !

What is Power BI?

Power BI is a Business Intelligence and Data Visualization tool used to convert data from data sources into interactive dashboards and analysis reports. For interactive visualizations, BI offers a cloud-based service. It provides a simple interface for the end-user. With the help of this, the end user can create their reports and dashboards. For different platforms, different versions of Power BI like Desktop, mobile Power BI, and Service-based apps are used. For Business Intelligence, it provides multiple services and software connectors.

Use of DAX in PowerBI: 

In Power BI, we can use DAX for calculated columns, Measures, and Tables. Computed columns allow us to create new columns based on the data given. 

For example, if you want to add the “Final Price” column in the table, then the DAX function is used to calculate the new column only if the quantity and price is available.

EX:

Price = List_Items[Quantity]*List _Items[MRP]

Here each row will have its calculated value.

We can also perform calculations using measures without adding any data. This is helpful for reports. Here the price can be displayed without the need for adding a new column to store it. 

EX:

Total MRP column*Total Quantity Column.

DAX functions used on tables return the entire tables. For example, to generate a list of the countries in which the organization has its clients use the function –

Cities touched = DISTINCT (Customers[City])

Basic knowledge of Power BI Desktop for a user is enough to create reports with all the available data. But if you want to use advanced calculations in the Power BI reports, you need DAX. 95% of Power BI potentials as an analytical tool is missed if you don’t use DAX. For example, if you want to make a visual to analyze growth percentages across different states of a country, the data fields that you import are not enough for that purpose. For this, new measures using DAX Language are to be made. DAX with Power makes the data analysis an innovative and intelligent approach.

Click here to learn Power BI Tutorial

Power BI Training

  • Master Your Craft
  • Lifetime LMS & Faculty Access
  • 24/7 online expert support
  • Real-world & Project Based Learning

Some of the Useful functions of DAX in PowerBI:

DAX functions are predefined formulas that perform the calculation on values provided to it in arguments. Every function performs a particular operation on the enclosed values in an argument. In a DAX formula, you can use one or more arguments. Some of the other functions of DAX are:

Date and Time functions:

Calculations on date and time values are performed by date and time functions. The data type of these functions is the datetime data type always. Some of the Date and Time functions are CALENDARAUTO, CALENDAR, DATE, DATEVALUE, DATEDIFF, DAY, HOUR, MINUTE, EOMONTH, MONTH, SECOND, NOW, TIMEVALUE, TIME, TODAY, WEEKDAY, WEEKNUM, YEARFRAC, YEAR.

Time Intelligence Functions:

These functions are used to evaluate values over a fixed period, such as years, quarter, months, weeks, days, etc. You can compare two scenarios in your report by specifying the time using these functions. Some of the Time Intelligence Functions are CLOSINGBALANCEYEAR, CLOSINGBALANCEMONTH, CLOSINGBALANCEYEAR, DATESINPERIOD, DATESBETWEEN, DATEADD, DATESQTD, DATESYTD, DATESMTD, ENDOFYEAR, ENDOFMONTH, ENDOFQUARTER, FIRSTNONBLANK, FIRSTDATE, LASTDATE, LASTDATE, NEXTQUARTER, NEXTMONTH, NEXTDAY.

Information Functions: 

Information Functions provide information related to the data values in the rows and columns. For the given values, it evaluates the given condition in the functions and returns True or False. Some of the Information Functions are CUSTOMDATA, CONTAINS, CONTAINSROW, ISERROR, ISBLANK, ISINSCOPE, ISEVEN, ISODD, ISNUMBER, ISLOGICAL, ISNONTEXT, ISTEXT, ISONORAFTER, USERNAME, LOOKUPVALUE.

Logical Functions: 

These functions are used to logically evaluate an expression or argument and return true or false based on the condition. Some of the Logical Functions are TRUE, FALSE, AND, OR, IF, IFERROR, IN, NOT, SWITCH.

Mathematical and Trigonometric Functions: 

These are the functions that are used to perform all sorts of mathematical functions on the values referred. Some of the math and trigonometric DAX functions available in PowerBI are ACOS, ACOSH, ABS, ASINH, ASIN, ATANH, ATAN, COMBINA, COMBIN, COS, COSH, DEGREES, CURRENCY, EVEN, EXP, DIVIDE, FACT, FLOOR.

Business Intelligence & Analytics, power-bi-dax-description-0, Business Intelligence & Analytics, power-bi-dax-description-1

Subscribe to our YouTube channel to get new updates..!

Statistical Functions: 

The functions used to carry out aggregation and statistical functions on data values in a DAX expression in Power BI. Some of the Statistical DAX functions available in PowerBI are APPROXIMATEDISTINCTCOUNT, ADDCOLUMNS, AVERAGEX, AVERAGEA, AVERAGE, COUNT, COUNTA, COUNTX, MAX, MAXA, MAXX, MEDIAN, MEDIANX, MIN, MINA, MINX, GEOMEAN, GEOMEANX, GENERATE, GENERATEALL, CROSSJOIN, DISTINCTCOUNT, etc. 

Text Functions:

These functions are similar to the string functions of Excel. These functions are used to evaluate string values. Some of the text DAX functions available in Power BI are: CODE, BLANK, COMBINEVALUES, CONCATENATEX, CONCATENATE, EXACT, FIND, FORMAT, FIXED, LEN, LEFT, LOWER, MID, REPLACE, RIGHT, REPT, SUBSTITUTE, SEARCH, TRIM, UNICHAR, VALUE, UPPER. 

Parent-child functions:

These are the functions used for the data values that are part of a parent-child hierarchy. Some of the Parent-child functions DAX functions available in Power BI are PATH, PATHLENGTH, PATHITEM, PATHCONTAINS, PATHITEMREVERSE.

Table functions: 

These functions are used to apply operations and conditions on entire tables. The output generated from table functions is used as the input in other arguments or expressions in a DAX formula. The results of these functions retain relationships between the table columns. Some of the table functions in Power BI are ALL, VALUES, FILTER, DISTINCT, RELATEDTABLE.

There are some functions that are very useful but do not fall under any category: ERROR, EXCEPT, GENERATESERIES, DATATABLE, GROUPBY, INTERSECT, ISEMPTY,ISSELECTEDMEASURE,NATURALINNERJOIN,NATURALLEFTOUTERJOIN,SELECTEDMEASURE,TREATAS,UNION,VAR,SELECTEDMEASUREFORMATSTRING, SELECTEDMEASURENAME, SUMMARIZECOLUMNS.

Click here to get latest Power BI Interview Questions and Answers for 2022

Some of the important DAX functions are

Average: This function is used to find the average from a given set of values. 
Ex:

Avgcomm - AVERAGE(List_Items[Price])

Max: This function is used to find the maximum from a set of values.
Ex:

Highsale = MAX(List_Items[Price])

Min: This function is used to find the minimum from a set of values.
Ex:

Lowestsale = MIN(List_Items[Price])

Count: This function is used to count any numerical values.
Ex:

TicketVolume - COUNT(Invoices[Ticket])

Concatenate: This function is used to join values in calculated columns. You can use ConcatenateX if you are using measures.
Ex:

ProMrp = CONCATENATE(List_Items[Items], List_ Items[MRP]

TotalYTD: This function is used to calculate the sum from the beginning of the current year to a specific date. Calculations are performed based on the calendar date, not according to the financial year.
Ex:

Cumisales = TOTALYTD(SUM(List_Items[Price]) , Invoices[Date])

All: This function returns everything. It ignores filters.

Power BI Training

Weekday / Weekend Batches

Conclusion 

In this blog, we have learnt about DAX, Power BI, and the benefits of DAX in Power BI. DAX functions can perform all the advanced calculations in Power BI. Using DAX functions in Power BI allows us to use most of the Power BI potentials. I hope you found this blog helpful. If you have any queries related to DAX in Power BI, you can comment below.

Related Articles:



Source link

Leave a Reply

Subscribe to Our Newsletter

Get our latest articles delivered straight to your inbox. No spam, we promise.

Recent Reviews


What is big data visualization?

Big Data Visualisation is one of the most essential aspects of communicating with a range of Big Data Analytics solutions. Once the stream of raw data is portrayed with pictures, the decision-making process becomes so much simpler.

Big Data Visualization includes the presence of about any sort of data in a graph form that refers to a process and evaluate. But it means going well beyond standard government charts, bar graphs and powerpoint presentations to more complex representations such as heat maps and fever charts, allowing business leaders to discover sets of data to recognise commonalities or unanticipated trends.

Scaling is the key characteristic of Big Data visualization. Today’s businesses are collecting and storing huge amounts of data which would take many years for a living thing to read, nor even realize. However, studies have found that the human retina can send signals to the nervous system at a rate of about 10 megabits per second. Big Data Visualization focuses on potent computer systems to consume raw corporate data and analyze it to create graphical representations that allow individuals to capture and recognize vast amounts of data in seconds.

[ Related Article: VMware VCloud Director Training ]

Big data visualization tools:

You should use the proper tools for data visualization and know how to switch the knowledge and practical information generated from Big Data into the benefits of quicker response.In order to meet or exceed the demand of the consumers, a set of features should be provided by the Big Data visualization tools such as ability to process multiple data coming from different sources, applying various filters to achieve good results, able to interact with large data sets, providing collaboration options for the customers and able to connect with other softwares, etc.

Regardless of the fact there are a ton of special hardware for Big Data visualization, both open-source and customizable, there is a collection of them which exists out a little slightly as they provide all and many of the other functionalities noted above.

Big Data Hadoop Training

  • Master Your Craft
  • Lifetime LMS & Faculty Access
  • 24/7 online expert support
  • Real-world & Project Based Learning

Challenges posed by big data visualization:

Big Data visualization can be an enormously potent company ability, but some key changes must be made before an organization can take full advantage of it. This included the following:

  • Availability of big data visualization specialists or experts.
  • Managing the quality data, ensuring the accuracy is important before storing it for the organizational use.
  • Visualization of hardware resources to make good decisions in a timely manner.

In this blog post we are going to discuss the top big data visualizations tools in the current market. You can select the ebay one based on your requirements.

Top big data visualizations tools:

In this section, we will discuss the best big data visualizations tools. A brief review of the market system of Big Data tools indicated the existence of famous players, such as Microsoft, SAP, IBM and SAS. And there are a number of specialized software companies providing largest big data visualization tools, including Tableau Software, Qlik and TIBCO Software. Leading tools of big data visualization includes the following list.They are:

  • Tibco Spotfire
  • Qlikview
  • Watson analytics
  • Fusion charts
  • Tableau
  • Sisense
  • Data wrapper
  • Infogram
  • Plot.ly

More info, Visit Openstack Administration Training

Tableau:

Tableau is among the largest software on the data visualization market that allows the production of different types of graphics, charts, dashboards, stories, maps and other components without programming.

It contains additional operations of descriptive statistics and inferential statistics with the creation of analytical charts. Enables collaboration of other techniques, such as Excel, SQL, SAP, Amazon, and others.

Plot.ly:

Plot.ly is a place to share online codes and visuals to assist users and developers.Graphics are made accessible to the community, that also enhances and enhances learning.The visual appeal of well-designed visuals with high-resolution graphics is a strong point.Although much more configured for Python, Plot.ly supplies R, Shiny and JavaScript libraries with the generation of distributed panels.

Qlikview:

QlikView is a component of Qlik, a software company based in Radnor, Pennsylvania, USA. QlikView is among the quickest business intelligence and data visualization tools that is convenient to use. It provides an Associative Search that makes decision-making uncomplicated. Its Associative Experience allows you to focus on the most relevant information, whenever and wherever you need it. It offers significant coordination with co-workers and partner organisations, a relative analysis of data, allows you to incorporate your relevant information into a data app and ensures that the right employees in the company have access to data through its dependable safety features.

Tibco spotfire:

Tibco Spotfire is a data analytics technology that offers you specific insights into your data. It’s accessible in Desktop, Cloud and Platform Editions. It has an Intelligence recommender system that significantly shortens visual analytics time. Its data chasing feature lets you better spot data outliers, discrepancies, and inadequacies. During the 2010 World Cup, FIFA used the apps to provide audiences with data analysis of previous achievements by country teams. Power users of Spotfire include Procter and Gamble, Cisco, NetApp, Shell.

Join our IOTA Training today and enhance your skills to new heights!

Cloud Computings, big-data-visualization-tools-description-0, Cloud Computings, big-data-visualization-tools-description-1

Subscribe to our YouTube channel to get new updates..!

Watson Analytics:

Watson Analytics is an IBM cloud-based analytics service that helps you easily find insights into your data. When you transfer your data to Watson Analytics, it will demonstrate the questions that will help you reply and then provide immediately focused data visualizations. You can also start exploring your data through natural language processing. Other key features involve computerized predictive analytics, one-click assessment, intelligent data discovery, streamlined analysis, available advanced analytics, self-service dashboards. Watson analytics also allows computer vision, which in turn provides more informative information from the data.

Sisense:

The easy-to-use configuration empirically derived trouble-free operation to non-techists. It performs an ad-hoc implementation of various data and empowers you to collect data from all your systems into a single and available repository, making it a single platform that manages the entire business intelligence workforce. It can also evaluate data in real time. For instance, during the peak season, sales trends have to be observed, they can provide a great insight into the vast amount of data that can be traced as quickly as possible. Popular customers include eBay, Merck, NASA, ESPN and SONY.

Data Wrapper:

Datawrapper is a simple platform for making visualizations such as infographics, maps, data tables and responsive charts such as line, bar, stacked bar, donut, etc. It is popular among publishers and journalists. Popular users include The Washington Post, The Guardian, Buzzfeed and The Wall Street Journal. It’s very easy to use and there’s no need for a coder to use.

Microsoft Power BI:

Microsoft Power BI is a business analytical tool that makes it easy for businesspeople to conceptually evaluate their data and develop strategies based on it. It gives access to on-site and in-cloud data. It has two pricing plans, one of which can be purchased free of charge. The free one comes with a 1GB data limit, which allows you to create, create and share dashboards and reports. Power BI Pro has all the power BI features, can consume live data with full interactivity, share data queries through the Data Catalog, and more.

Empowering Your Success: On Job Support Services for Seamless Performance.

Infogram:

Infogram is a data visualization and infographic company founded in 2012 by Uldis Leiterts, Raimonds Kaže and Alise Semjonova. It allows you to choose from more than 1 million images to make infographics. It makes it easy to access data by allowing you to edit the data in the editor and connect to your desired cloud service. Some of the customers are Deloitte, Nielsen, Skyscanner, and MSN. Easy-to-use steps find it easier for educators, journalists and business professionals to envision their data. It has produced over 4.8 million infographics, which are viewed by more than 500 people a month.

Fusion Charts:

FusionCharts is a component of InfoSoft Global, a systems integrator of data analysis products. It is used by more than 80% of Fortune 500 companies. The idea of FusionCharts came from 16-year-old Pallav Nadhani in 2001, who found himself unsatisfied with Microsoft Excel charting abilities while finishing his school assignment.

Big Data Hadoop Training

Weekday / Weekend Batches

 Conclusion:

Visualizing Big Data can help the company gain new knowledge and make strategies that can bring revenues and make them realize their clients.Both data visualizations and visualizations turn data into images that anybody can probably recognize as extremely valuable tools to explain the importance of digits to people who are more visually oriented. All the tools mentioned above helps the organizations in getting good and profitable results for the business.

Related Article:

Hpe Synergy Training

Facets Interview Questions



Source link