Forum Discussion
Previous year calculations bring back current year values :/ - help
I posted this in another thread but highlighted the issue of it not plotting correctly on a line graph - however the issue actually is both of these calcutions ie
PY Revenue = CALCULATE([Revenue], SAMEPERIODLASTYEAR(all('Fiscal Date'[Date])))
PY 2 = CALCULATE([Revenue], PARALLELPERIOD(ALL('Fiscal Date'[Date]), -1, YEAR))
bring back exaclty the same data as this
Revenue = (CALCULATE(Sum(Registrations[MRR])) + CALCULATE(sum(Sales[RevenueNettAmount])))
what am i doing wrong, could this be a cross fact issue. I have 2 facts linking together through dimensions. However its only the date dimension that is the linking bit for these 2 which has a one to many relationship for each fact in a single direction.
15 Replies
- vanessafvg
Community Champion
cant believe no one can help with these - anyone?
- mattbrice
Solution Sage
Remove the ALL function call inside the SAMEPERIODLASTYEAR and PARALLELPERIOD calls.
- vanessafvg
Community Champion
i had that previously but it brings back nothing - its because i have this filter on my dashboard
this is what i have changed to
PY Revenue = CALCULATE([Revenue], SAMEPERIODLASTYEAR('Fiscal Date'[Date]))
PY 2 = CALCULATE([Revenue], PARALLELPERIOD('Fiscal Date'[Date], -1, YEAR))
and as you can see now its empty when i change this, i am baffled...
- mattbrice
Solution Sage
Does your 'Fiscal Date' have dates in it for the prior fiscal year(it must for time intelligence to work)? Is your 'Fiscal Date' calendar table related to the fact table via columns of type Date? if not, can you try this:
PY Revenue = CALCULATE([Revenue], SAMEPERIODLASTYEAR('Fiscal Date'[Date]), ALL('Fiscal Calendar') )