I want to visualize 2 trends in Power BI with rolling revenue for 30 days
- First trend - actual day
- Second trend - SAMEPERIODLASTYEAR
I have a problem with last day for the Second trend (wrong calculation) My steps for calculate Second trend:
Revenue PY = CALCULATE([Revenue Act];SAMEPERIODLASTYEAR('Calendar'[Date]))
Revenue PY (30d) = CALCULATE(revenue_v1[Revenue PY];FILTER(ALL('Calendar');'Calendar'[Index]>MAX('Calendar'[Index])-30&&'Calendar'[Index]<=MAX('Calendar'[Index])))
What I am doing wrong?