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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Calculate the value of a specific past month and set it for all current months

Hi, I'm trying to create a measure that would calculate the value of previous december for all current month. 

So far I managed to get the value of past december 2018 for the current december 2019 month with the following Dax formula : 

CALCULATE(Table[Value];FILTER(ALL(Date);Date[Month_NB]=12);SAMEPERIODLASTYEAR(Date[Date])) 
 
But I would like to get the same December 2018 value in all month starting from January to december 2019. 
Thanks 
 
Capture13.PNG
1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

Hi @Anonymous 

try

CALCULATE(Table[KPI Value];FILTER(ALL(Date);Date[Month_NB]=12 && YEAR(Date[Date])=YEAR(SELECTEDVALUE(Date[Date]))-1) ) 

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

2 REPLIES 2
az38
Community Champion
Community Champion

Hi @Anonymous 

try

CALCULATE(Table[KPI Value];FILTER(ALL(Date);Date[Month_NB]=12 && YEAR(Date[Date])=YEAR(SELECTEDVALUE(Date[Date]))-1) ) 

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

Thanks it works fine ! 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.