Forum Discussion
Jacy
8 years agoFrequent Visitor
Last year/month value
Hi I have a problem with calculations of different dates, I have a matrix by product, and the month dimension pivoted, in one column I need to add the value of the current year and in another the last year, as the photo in example. I used the following calculation:
calculate (sum (table [value]); filters (table [year] = max (year)))
this works perfectly, but the one from the previous year does not.
calculate (sum (table [value]); filters (table [year] = max (year)) - 1)
af first works but when I select a year, this measurement is left blank because the data has been filtered.
can anybody help me?
ps: the picture are in portuguese.
calculate (sum (table [value]); filters (ALL(Table[year]), table [year] = selectedvalue(Table[year]) - 1))
2 Replies
- parry2kSuper User
calculate (sum (table [value]); filters (ALL(Table[year]), table [year] = selectedvalue(Table[year]) - 1))
- AnonymousNot applicable