Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello,
In my data model I have a custom fiscal calendar (begins on jul-1).
For the YTD calculation, I'm using a measure like:
Faturação YTD Fiscal = TOTALYTD(SUM(Factos[Faturação]);'CalendárioFiscal'[Date];ALL('CalendárioFiscal'[Date]);"06/30")
This works well, but I don't understand why I need the 3rd and 4th argument, since the function returns the same values without these as long as the fiscal calendar exists. Are these argumens necessary at all or are they meant to be used if there's no fiscal calendar?
Also, if the 4th argument is there, the 3rd is also mandatory. Why?
Thank you!
Solved! Go to Solution.
@webportal,
What is the data range of your fiscal calendar ? Assume it begins on July-1 and ends on June-30, I make a test using your DAX and the following DAX, they return different results.
Faturação YTD Fiscal 1 = TOTALYTD(SUM(Factos[Faturação]);'CalendárioFiscal'[Date])
In addition, the third and fourth arguments are optional so they are not necessary in TOTALYTD() function. The filter(3rd) parameter is an expression that specifies a filter to apply to the current context and the year_end_date(4th) parameter is a literal string with a date that defines the year-end date.
Moreover, if the 4th argument is there, the 3rd is not mandatory. And if you need the 4th argument depends on that what data you would like to get from the measure, please check the above screenshots. If you have any questions, please share sample data of your data table and fiscal calendar table.
Regards,
Lydia
@webportal,
What is the data range of your fiscal calendar ? Assume it begins on July-1 and ends on June-30, I make a test using your DAX and the following DAX, they return different results.
Faturação YTD Fiscal 1 = TOTALYTD(SUM(Factos[Faturação]);'CalendárioFiscal'[Date])
In addition, the third and fourth arguments are optional so they are not necessary in TOTALYTD() function. The filter(3rd) parameter is an expression that specifies a filter to apply to the current context and the year_end_date(4th) parameter is a literal string with a date that defines the year-end date.
Moreover, if the 4th argument is there, the 3rd is not mandatory. And if you need the 4th argument depends on that what data you would like to get from the measure, please check the above screenshots. If you have any questions, please share sample data of your data table and fiscal calendar table.
Regards,
Lydia
User | Count |
---|---|
140 | |
113 | |
104 | |
76 | |
63 |
User | Count |
---|---|
135 | |
126 | |
110 | |
70 | |
61 |