Forum Discussion

vanessafvg's avatar
vanessafvg
Community Champion
9 years ago

Previous Year Calculation plotting oddly on line graph

as you can see from the line graph i have a revenue measure and previous year revenue.   What i dont understand is why doesn't the PY plot the same as the revenue.

 

this is the measure for the revenue

Revenue = CALCULATE(Sum(Registrations[MRR]) + sum(Sales[RevenueNettAmount])) 

this is the measure for PY

PY Revenue = CALCULATE([Revenue], SAMEPERIODLASTYEAR(ALLSELECTED('Fiscal Date'[Date])))

 

I would like the value to plotted on the line graph in the same way, what am i missing?  The other thing is these seem to be bring back exactly the same values

 

8 Replies

  • MalS's avatar
    MalS
    Resolver III

    How does PY Revenue = CALCULATE([Revenue], SAMEPERIODLASTYEAR('Fiscal Date'[Date])) look?

    • vanessafvg's avatar
      vanessafvg
      Community Champion

      from what perspective?  see first graph for how it is plotting as opposed to revenue. 

      • MalS's avatar
        MalS
        Resolver III

        Not sure if you noticed, but I changed the formula slightly for PY Revenue - I was wondering if that gave results that made more sense.

    • vanessafvg's avatar
      vanessafvg
      Community Champion

      ah yes sorry my mistake, the problem with that, which i did before i changed it to this was because i have a filter on date on my dashboard as in year month it brings back 0  

       

       

      • MalS's avatar
        MalS
        Resolver III

        The date filter shouldn't stop SAMEPERIODLASTYEAR from working without ALLSELECTED. Any chance there was actually 0 revenue last year in your data?