Skip to main content

Tabular Measure

A Tabular Measure is used to define calculations using DAX (Data Analysis Expressions). These measures are automatically included in Power BI reports, making them instantly available in any Power BI file that uses the model. This ensures a consistent set of measures that are easily reusable, saving time and ensuring uniformity across all reports. The measures are listed in the Table section. By doing so, the measures are organized into the tables within Power BI.

Dax Measure

NameDescription
DescriptionExplanation of the measure, will be shown on the mouse over in Power BI. When not provided, the DAX is presented
DisplayFolderFolder where the measure will be shown in the user interface of BI-tools like Power BI and Excel
DocumentationPlace for documentation. Not used for generating anything at the moment.
Expression*DAX expression for the measure
ExpressionFile**DAX expression for the measure, based on a file
FormatStringFormat string for the measure
FormerNameFor renaming, provide a formername and a copy with that will be created, so reports will remain working.
IsHiddenControls the visibility of the measure in Power BI or Excel. Setting it to true hides the measure from the interface. By default, this property is set to false
Name*Name of the measure
DerivedMeasuresList of derived measures based on this measure
* Indicates that the field is mandatory and must be used. ** If used, the Expression field is no longer required, as it is included in the ExpressionFile.

Basic Measure: Name and Expression

- Name: "Number of Comments"
Expression: |
CALCULATE(Countrows('Category'), 'Category'[Category] = "Comment")
  • Name: This specifies the name of the measure.
  • Expression: This is the DAX formula that defines the measure.
Common Measure Example
- Name: "Number of Comments"
Expression: |
CALCULATE(Countrows('Category'), 'Category'[Category] = "Comment")
FormatString: 0
IsHidden: true
DisplayFolder: Categories

Description

- Name: "Number of Comments"
Expression: |
CALCULATE(Countrows('Category'), 'Category'[Category] = "Comment")
Description: Counts the number of comments in the 'Category' table.
  • Description: The Description field provides an explanation of the measure. In Power BI, this description will be shown as a tooltip when hovering over the measure. If not provided, the DAX formula will appear instead.

DisplayFolder

- Name: "Number of Comments"
Expression: |
CALCULATE(Countrows('Category'), 'Category'[Category] = "Comment")
DisplayFolder: Categories
  • DisplayFolder: The DisplayFolder allows you to organize your measures into folders within Power BI. By organizing measures into folders, you can better structure your tables, making it easier to find specific measures, especially when dealing with large tables.

Documentation

- Name: "Number of Comments"
Expression: |
CALCULATE(Countrows('Category'), 'Category'[Category] = "Comment")
Documentation: This measure counts the rows in the 'Category' table where the category is 'Comment'.
  • Documentation: Place for documentation. Not used for generating anything at the moment.

ExpressionFile

- Name: "Number of Comments"
ExpressionFile: Number_of_Comments.dax
  • ExpressionFile: The ExpressionFile property allows you to reference external files containing a DAX expression. In this example, the .dax extension is used, but it can vary as long as the same extension is consistently applied in both the measure definition and the file.

FormatString

- Name: "Number of Comments"
Expression: |
CALCULATE(Countrows('Category'), 'Category'[Category] = "Comment")
FormatString: 0
  • FormatString: The FormatString property defines the display format for the measure’s result. In this example, "0" rounds numbers to the nearest integer without decimals. The FormatString property is explained in detail on this page: Format strings

FormerName

- Name: "Number of Comments"
FormerName: "Count Comments"
Expression: |
CALCULATE(Countrows('Category'), 'Category'[Category] = "Comment")
  • FormerName: The FormerName property specifies the previous name of the measure. This is particularly useful when renaming a measure, as it ensures older reports continue to function by maintaining backward compatibility.

IsHidden

- Name: "Number of Comments"
Expression: |
CALCULATE(Countrows('Category'), 'Category'[Category] = "Comment")
IsHidden: true
  • IsHidden: The IsHidden property controls the visibility of the measure in Power BI or Excel. Setting it to true hides the measure from the interface. By default, this property is set to false.

DerivedMeasures

- Name: "Average Call Duration"
Expression: |
DIVIDE([Calltime in Seconds], [# PhoneCalls])
DerivedMeasures:
- DerivedMeasure: DurationInSeconds
- DerivedMeasure: DurationInMinutes
- DerivedMeasure: DurationInHours
  • DerivedMeasures: The DerivedMeasures property lists any measures that are calculated based on this measure. The DerivedMeasures property is explained in detail on this page: Derived Measures