
Answer-first summary for fast verification
Answer: EVALUATE SUMMARIZECOLUMNS('Inventory'[ItemID], "TotalQuantity", CALCULATE(SUM('Inventory'[Quantity]), 'Inventory'[StockDate] >= DATEADD(QUARTER, -1, TODAY())))
Option B correctly sums the quantities for each item and filters the inventory to include only those from the last quarter. Options A, C, and D either do not filter the date correctly or do not sum the quantities correctly.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
Consider a scenario where you need to connect to and query datasets using the XMLA endpoint in Fabric. You have a tabular model with a table named 'Inventory' that contains columns 'ItemID', 'ItemName', 'StockDate', and 'Quantity'. Write a DAX query to find the total quantity of each item in the last quarter. How would you structure this query?
A
EVALUATE SUMMARIZECOLUMNS('Inventory'[ItemID], "TotalQuantity", SUM('Inventory'[Quantity]))
B
EVALUATE SUMMARIZECOLUMNS('Inventory'[ItemID], "TotalQuantity", CALCULATE(SUM('Inventory'[Quantity]), 'Inventory'[StockDate] >= DATEADD(QUARTER, -1, TODAY())))
C
EVALUATE SUMMARIZECOLUMNS('Inventory'[ItemID], "TotalQuantity", CALCULATE(SUM('Inventory'[Quantity]), 'Inventory'[StockDate] >= DATEADD(QUARTER, -1, NOW())))
D
EVALUATE SUMMARIZECOLUMNS('Inventory'[ItemID], "TotalQuantity", SUM('Inventory'[Quantity]))