I'm working with Supercharge Excel, exercise 63, Total Sales FYTD 30 June. The book's measure works for me, but I am not sure about how the optional parameters are handled when missing.
When I look at online examples indicate to use a comma when you are not using an optional parameter.
The third parameter on TOTALYTD is filter, which is optional. If I leave it out (and use the 4th parameter for fiscal year) using a comma the formula checker gives me an error --> 'Argument '3' in TOTALYTD function is required. If I leave the 3rd parameter out, use the 4th, and have no comma then it works.
(1) =TOTALYTD([Total Sales],'Calendar'[Date],"6/30") -- from the book, this works, no 3rd parameter, but also no comma.
(2) =TOTALYTD([Total Sales],'Calendar'[Date],,"6/30") -- use a comma for optional 3rd parameter, get error mentioned above.
(3) =TOTALYTD([Total Sales],'Calendar'[Date],ALL('Calendar'),"6/30") -- include 3rd parameter (filter), this works.
Does anyone know why #1 above works, but not #2?
A dedicated forum to help people when working through the book "Learn to Write DAX"
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests