PL-300 Exam QuestionsBrowse all questions from this exam

PL-300 Exam - Question 92


HOTSPOT -

You have a Power BI report that contains a measure named Total Sales.

You need to create a new measure that will return the sum of Total Sales for a year up to a selected date.

How should you complete the DAX expression? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Hot Area:

Exam PL-300 Question 92
Show Answer
Correct Answer:
Exam PL-300 Question 92

Box 1: TOTALYTD -

TOTALYTD evaluates the specified expression over the interval which begins on the first day of the year and ends with the last date in the specified date column after applying specified filters.

Syntax: TOTALYTD (

,

[, ]

[, ]

Expression - The expression to be evaluated.

Dates - The name of a column containing dates or a one column table containing dates.

Example:

TOTALYTD ( -- 2007-01-01 : 2007-05-12

[Sales Amount],

'Date'[Date]

Box 2: 'Date'[Date]

Reference:

https://dax.guide/totalytd/

Discussion

13 comments
Sign in to comment
lukelin08
Oct 7, 2022

Answer is correct

LeeTheRed
Dec 8, 2023

Not quite, the last closing bracket should be at the end.

Orkhannnn
Oct 27, 2022

Answer is correct.

Igetmyrole
Sep 6, 2023

TOTALYTD `Date`[Date] TOTALYTD: is being used to calculate the sum of "Total Sales" year-to-date up to the selected date. `Date`[Date]: provides the date context for the calculation.

Patrick666
Dec 9, 2022

TotalYTD; 'Date'[date]

LambdaBld
Apr 20, 2023

Why can't we use LASTDATE instead of date ?

ajvela
Apr 25, 2023

because the requirement is the sum of Total Sales for a year up to a selected date.

Nemesizz
May 1, 2023

So including the most recent year in the data right?

Nemesizz
May 1, 2023

So including the most recent year in the data right?

iccent2
Dec 9, 2022

Answer is Correct!

jsking
Dec 25, 2022

Answer is correct

RazaTheLegend
Apr 12, 2023

Answer is correct

JudT
Mar 27, 2024

Correct! Could Be: CALCULATE( [Total Revenue], TOTALYTD('Date'[Date]) )

rcaliandro
Aug 18, 2024

Answer is correct TOTALYTD, 'Date'[Date]

jaume
Nov 19, 2024

Position of the second parenthesis (closin parenthesis) IN FRONT of the second argument is totally misleading; since TOTALYTD function requires two mandatory arguments, you can assume this is an error and this parenthesis should be AFTER the second argument.... TOTALYTD and Date[Date] should work in this scenario.

vysh07
Mar 9, 2023

can someone explain why can't we use SUM function?

1sourabhpatel1
Mar 17, 2023

it already using the measure

814145c
Apr 14, 2025

SUM is syntactically incorrect, it requires just one column. SUM(<Column>)

Shalaleh
May 2, 2023

Answer is correct.