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! Learn more

Reply
Anonymous
Not applicable

Calculate value of 3 months ago doesn't work

Hi,

 

I have this weird issue: I want to calculate the average of a calculated column for the period 3 months ago. So I created this measure:

 

Value3MonthsAgo = CALCULATE(AVERAGE(Table[CalculatedColumn]); FILTER('Table';Table[Period] = DATEADD(LASTDATE(Table[Period]);-3;MONTH)))

 

And it only returns a BLANK value...

 

I tried the same with another column and then it is working:

 

FakeValue3MonthsAgo = CALCULATE(AVERAGE(Table[OtherNonCalculatedColumn]); FILTER('Table';Table[PeriodDATEADD(LASTDATE(Table[Period]);-3;MONTH)))

 

And when filtering in min period it is also working:

 

FakeValue3MonthsAgo = CALCULATE(AVERAGE(Table[CalculatedColumn]); FILTER('Table';Table[Period] = MIN(Table[Period])))

 

 

I don't get it.... what do I do wrong?

6 REPLIES 6
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

What's the formula of CalculatedColumn used in the formual? Could you please share your sample table or .pbix file for further analysis? Please create a calculate column using the following formula and check if it works fine.

 

selected date=DATEADD(LASTDATE(Table[Period]);-3;MONTH)


In addition, Date column used in DATEADD function must have a contiguous range of dates. More details, please review this blog(it's still the same in Power BI): https://powerpivotpro.com/2011/10/slicers-for-selecting-last-x-periods/#comment-274090 .

Best Regards,
Angelia

 

Anonymous
Not applicable

Hi,

I don't have a continuous range of dates. Only dates every 3 months. But other measures work, so I don't think that could be the problem...

 

How do I share a .pbix file here?

Hi @Anonymous,

You can share your .pbix file by private message.

Thanks,
Angelia

Anonymous
Not applicable

Hi,

 

I sent you a private message but I didn't see the option to include a file?

Hi @Anonymous,

You can post your .pbix file to OneDrive, and share the link in private message.

Best Regards,
Angelia


Anonymous
Not applicable

@v-huizhn-msft, I sent you a private message but I didn't get any respond?

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors