Forum Discussion
sugloevg
6 years agoFrequent Visitor
CALCULATE returns blank values
Hi! I have a simple measure but i can't get why it doesnt work. For example i have table: Year LSV 2018 1235 2019 5432 2020 7653 So i need to show value by the previou...
az38
6 years agoCommunity Champion
Hi sugloevg
Measure has no real sense with just a [Year] in filter sentence
try
PREVLSV =
var _curYear = MAX('Table'[Year])
RETURN
CALCULATE(SUM('Table'[LSV]), FILTER(ALL('Table'), 'Table'[Year] = _curYear -1))
Anonymous
4 years agoNot applicable
Hi az38
I have used your formula but what if I want to get the month breakdown? It's showing the total sum but I know it's because of the Calculate Sum but don't know How to get month breakdown
- az384 years agoCommunity Champion
Hi Anonymous
you can try SAMEPERIODLASTYEAR() function.
like
CALCULATE(SUM('Table'[LSV]), SAMEPERIODLASTYEAR('Table'[Date]))