Forum Discussion
Fiscal Year Calculation`
- 2 years ago
you can also use this measure to get the same data
Sales YTD = VAR __SUM = CALCULATE ( [Amo], VAR FirstFiscalMonth = [StartFY] -- Set the first month of the fiscal year VAR LastDay = MAX ( 'Calendar'[Date] ) VAR LastMonth = MONTH ( LastDay ) VAR LastYear = YEAR ( LastDay ) - IF ( LastMonth < FirstFiscalMonth, 1 ) VAR FilterYtd = DATESBETWEEN ( 'Calendar'[Date], DATE ( LastYear, FirstFiscalMonth, 1 ), LastDay ) RETURN FilterYtd) VAR _MaxdareSales = MAX('Sales'[Business Days]) RETURN IF(_MaxdareSales,__SUM)
Ritaf1983 , thanks for reply.. can i use FYTD =CALCULATE([Total ReturnV1],DATESYTD('Date Table'[_Date],yourtable[yearend]) the year field as the parameter to the function?
Hi ak77
The suggested way is not correct for sure because 'yourtable[yearend]' is a column and not a scalar value, so you can't filter by it ( because the column is a multiple values and not one).
You can try to modify it to :
FYTD =CALCULATE([Total ReturnV1],DATESYTD('Date Table'[_Date],max(yourtable[yearend])
just try, there is no way a computer can defeat you 🙂
- ak772 years agoPost Patron
No Luck ! Sorry
- Ritaf19832 years agoSuper User
What is wrong with my first suggestion?
For a more detailed solution please share some dummy PBIX to work with.- ak772 years agoPost Patron
The user does not want the date to be hardcoded FYTD =CALCULATE([Total ReturnV1],DATESYTD('Date Table'[_Date],"31/03")),
He wants it to be taken from a column name coming from DB Table.. so if these value changes .. they can just update it in the DB column without any report changes