Forum Discussion
Issues with measure using time intelligence
- 8 years ago
How about this one
Total Amount Last Year = CALCULATE ( [Total Amount], SAMEPERIODLASTYEAR ( 'Dates'[Date] ), ALL ( Dates ) )
Hi Zubair_Muhammad,
This does work without filters, but it does not work as well once I use some filters. For example, if I want to see just 2015 and 2016, the "Total Amount Last Year" for 2015 will be blank, even though there were amounts in 2014.
Even if I was not filtering on years, it's bizarre that I would need to resort to ALLEXCEPT, whereas the Contoso sample report works without ALLEXCEPT. Would you have any ideas why there is a difference?
And thank you for your assistance.
How about this one
Total Amount Last Year =
CALCULATE (
[Total Amount],
SAMEPERIODLASTYEAR ( 'Dates'[Date] ),
ALL ( Dates )
)- Nemes8 years agoFrequent Visitor
That does seem to work! I thought I tried this before, but I think I tried ALL('Dates'[Date]) instead of ALL(Dates). I'm not sure why specifying only the Date column as an argument to ALL doesn't work, considering thre are no date duplicates.
Would you know why I need to specify the ALL() function, unlike all of the other how-to's and guides that I've found on this subject?
- Zubair_Muhammad8 years agoCommunity Champion