HOTSPOT
Note: This question is part of a series of questions that use the same scenario, For your convenience is repeated in each question. Each question presents a different goal and answer choices, but the text of the scenario is the same in each question in this series.
Start of repeated scenario
You have six workbook queries that each extracts a table from a Microsoft Azure SQL database. The tables are loaded to the data model, but the data is not loaded to any worksheets. The data model is shown in the Data Model exhibit.
Your company has 100 product subcategories and more than 10,000 products.
End of repeated scenario.
You need to create a measure named [Sales Monthly RT] that calculates a running total of [Sales] for each date within a month as shown in the following exhibit.
How should you complete the DAX formula? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Answer: SUM [Sales], DATESMTD
Explanation:
The following sample formula creates a measure that calculates the ‘Month To Date Total’ for the Internet sales.
To see how this works, create a PivotTable and add the fields, CalendarYear, MonthNumberOfYear and DayNumberOfMonth, to the Row Labels area of the PivotTable. Then add a measure, named Month To Date Total, using the formula defined in the code section, to the Values area of the PivotTable.
=CALCULATE(SUM(InternetSales_USD[SalesAmount_USD]), DATESMTD(DateTime[DateKey]))
https://msdn.microsoft.com/en-us/query-bi/dax/datesmtd-function-dax
Leave a Reply