MIN

Calculation of accumulated totals

A common scenario is one in which we want to evaluate the accumulated total, including all data up to a certain date and not just those involved in the current filter context. For example, if we assume the existence of a sales table Sales that contains an Amount column with the sales figure, we could define a measure that calculates the sum of this column with the following DAX expression:

Submitted by admin on Sun, 01/08/2023 - 11:10

Access to the dates of the current context

Assuming we have a calendar table ("Calendar") and a "Date" field containing the dates, we can access the dates involved in the current context through said field. This allows us to access the first day, the last day, etc. of the period involved in the current context using DAX functions and simple arithmetic operations.

Thus, for example, we can access the first day of the current context by calculating the minimum value of the date column with the MIN function, as follows:

Submitted by admin on Wed, 06/26/2019 - 16:39