Linked Questions

Popular Questions

Dax rolling 30 days with SAMEPERIODLASTYEAR

Asked by At

I want to visualize 2 trends in Power BI with rolling revenue for 30 days

  • First trend - actual day

I have a problem with last day for the Second trend (wrong calculation) My steps for calculate Second trend:

  1. Revenue PY = CALCULATE([Revenue Act];SAMEPERIODLASTYEAR('Calendar'[Date]))
  2. 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?

enter image description here

Related Questions