Forum Discussion
Variable financial year
- 4 years ago
Mo-PHAT , You need two things for YTD
Year and Day of year.
I am assuming you have logic for you start date, based on that You can create year. Numeric year.
Else create a rank on Start date of year
Year Rank = Rankx('Date', 'Date'[Start of Year],,asc,dense)
Day of year = Datediff([Start of year], [Date], day())
YTD= CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Year Rank]=max('Date'[Year Rank]) && 'Date'[Day of Year] <= Max('Date'[Day of Year]) ))
LYTD = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Year Rank]=max('Date'[Year Rank])-1 && 'Date'[Day of Year] <= Max('Date'[Day of Year])))Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA