Forum Discussion
ak77
2 years agoPost Patron
Fiscal Year Calculation`
Hi All, Thanks much for helping out till date !.. I need help on the below requirement where we have to display fiscal year sum of returns for multiple clients in a measure.. til now i had c...
- 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)
Ahmedx
2 years agoSuper User
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Ahmedx
2 years agoSuper User
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)