Daily DAX : Day 299 TODAY

Power BI DAX TODAY Function

Description

The TODAY function in Power BI DAX (Data Analysis Expressions) returns the current date based on the system date of the computer running the Power BI Desktop or Power BI Service. It takes no arguments and is commonly used for date-based calculations and dynamic reporting.

Syntax

TODAY()

Returns: A date value representing the current date.

Use Case

The TODAY function is used to create dynamic calculations or filters that depend on the current date, such as:

  • Calculating the difference between the current date and another date (e.g., aging of invoices).
  • Filtering data to show records up to the current date.
  • Creating dynamic reports that update automatically based on the current date.

Example

Suppose you have a sales table with a column OrderDate. You can calculate the number of days since each order was placed using:

DaysSinceOrder = DATEDIFF(Sales[OrderDate], TODAY(), DAY)

This measure returns the number of days between each OrderDate and the current date.

Notes

  • The result of TODAY updates automatically when the report refreshes.
  • It is based on the system date of the machine or server running Power BI.
  • Use with other DAX functions like DATEDIFF, DATEADD, or filters for dynamic analysis.

Comments

Popular posts from this blog

Daily DAX : Day 65 INFO.TABLEPERMISSIONS

Daily DAX : Day 55 PV