Database Reference
In-Depth Information
2. Check both of these measures to add them to the PivotTable columns.
Alongside the total sales for each product category, for all the sales territor-
ies, we see the contribution in the US along with the Non-US Sales.
Working with Time Intelligence
Now let's have some fun with dates. Several DAX functions contain built-in date logic
that simplifies the otherwise complex logic for comparing and accumulating values
across dates and time. We'll start with a function called TOTALMTD . This function
accepts a single date value and returns a table object filled with all the dates from
the beginning of the month up to that date. By using this in the second argument for
the CALCULATE function, we can calculate the month-to-date accumulation for any
measure value:
1. Create a new measure in the Internet Sales table by entering the follow-
ing text in an open cell in the Calculation Pane:
Sales MTD:= TOTALMTD ( [Sales Amount],
'Date'[FullDate] )
Search WWH ::




Custom Search