top of page
hand-businesswoman-touching-hand-artificial-intelligence-meaning-technology-connection-go-

DAX measure !


 


An Introduction to DAX measure




 What is a DAX measure?


Measures are DAX formulas that are used to generate new calculated values. Similar to calculated columns, they reference entire table or columns. But unlike calculated columns, the measure values are not visible within tables. Measure values can only be seen within a visualization like a chart or matrix. Measures are evaluated based on filter context. The values they take constantly recalculate whenever the fields or filters around them change. For example, whenever you drag a new field or dimension into the row or column of a matrix, or apply a new filter to a report, the filter context and the value that the measure should return is changed. 


Key Points: 

·        Use measures to aggregate.

·        Measures are used to numerical calculated values that can be analysed within the value fields of the report visual.

·        Measures can be used either by implicit or explicit method which will be explained in detail below.



IMPLICIT MEASURE 

Within the report view, implicit measures are created by dragging raw numerical fields like order quantity from sales data into the values pane of a visual. Power BI automatically slect and apply an aggregation mode, typically a sum as shown below in the picture.




Implicit functions are only accessiblw within the specific visualization in which they are created. They are neither portable nor can be referenced somewhere else.   


EXPLICIT MEASURE

Explicit measures are created by entering DAX functions to explicitly define calculated columns or measures. Below example shows how explicit measure is created for sum of order quantity.

Right click on the table where you want to add a measure. And select “New Measure” option.





Now, type in the measure formula.






As we add the new measure into a matrix visual which has “Order date ” in rows, We can see the explicit measure giving a sum of order quantity for each quarter.





Explicit mesaures can be used anywhere in the report and can be referenced within other DAX calculations to create more complex formulas which is known as “measure tree”.




Creating an explicit measure is the best way to use it even for simple calculations instead of using auto- aggregation available implicitly.

Happy Analyzing!

 

 

28 views0 comments

Recent Posts

See All
bottom of page