Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

KPI does not work with Sameperiodlastyear (Month) as target

Hello,

I would like to have a KPI which takes the current date's value (measure for total contracts-Contracts) and compare it with the sameperiodlastyear's value (measure for total contracts of same period previous year-SPLYearContracts). When I chose the period as year there is no problem. But I would like to compare the current month's value to same month of previous year. So I drag Month from Calendar Table as trend axis. However, KPI does not show what I would like. When I drag Contracts and  SPLYearContracts with Date, it shows exacltly as it is intended (see below). So my measures are defined right and when I choose Year from Calendar as trend there is no problem. However when I drag month as trend it shows 2022 December Value instead of the latest month which is March.

 

Trend axis with MonthTrend axis with MonthTrend axis with YearTrend axis with Year

 

I have only two years data (2022, 2023). How can I make Power Bi takes as the latest value 7727 (March 2023) and compares it with 5497(March 2022) as it is in the matrix. 

Thanks in advance for the help. Appreciate it. 

 

 

DateSPLYear's ContractsContractsLast Month's Contracts
2022   
January 2945 
February 37742945
March 54973774
April 123895497
May 1382812389
June 1378513828
July 1293613785
August 1356512936
September 1273213565
October 1128112732
November 763311281
December 67697633
2023   
January294547366769
February377462094736
March549777276209
April12389 7727
May13828  
June13785  
July12936  
August13565  
September12732  
October11281  
November7633  

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Solved with RelativeMonth column in Calendar Table. Please ignore the entry.

Thanks

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Solved with RelativeMonth column in Calendar Table. Please ignore the entry.

Thanks

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.