Forum Discussion

Uzi2019's avatar
Uzi2019
Community Champion
6 years ago
Solved

Year wise comparison

Hi,

I have last 3 years data i.e 2018,2019,2020. (date column in dd/mm/yyyy)

I want to show  year wise comparison of cost against client's name but not able to do with given formula.

 

Last Year Spend = CALCULATE(SUM(table[Spend]),SAMEPERIODLASTYEAR(table[Date]))
 
If I select only year in date hierarchy last year spend measure is blank.
if i dont select anything in date hierachy it shows like this 
 
 
Please help me to calculate year wise (2019 vs 2018)
 
Thanks in advance!!!

1 Reply