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
bunny18
Helper I
Helper I

How to calculate 3 months and 6 months average

Hi, am looking for help to add a 3month and 6 months average to a Defect Detection chart (2020) (pbix attached).

https://drive.google.com/file/d/1idTTxueLZ4PwfZVSeybambEAJ7BNAmTj/view?usp=sharing

I have also put a excel sheet chart which i want to replicate in the pbix.

 

Could you please help how to achieve it.

1 ACCEPTED SOLUTION
manikumar34
Solution Sage
Solution Sage

@bunny18 , 

 

Use something like this on Date column. 

6 Months Average Measure =
CALCULATE(
SUM('DRE created 2020'[DRE2020]),
DATESINPERIOD('DRE created 2020'[TempColumn],LASTDATE('DRE created 2020'[TempColumn]),-6,MONTH)
)
/
CALCULATE(
DISTINCTCOUNT('DRE created 2020'[TempColumn]),
DATESINPERIOD('DRE created 2020'[TempColumn],LASTDATE('DRE created 2020'[TempColumn]),-6,MONTH)
)

 

manikumar34_0-1603194480610.png

 

Regards,

Manikumar

 





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




View solution in original post

2 REPLIES 2
manikumar34
Solution Sage
Solution Sage

@bunny18 , 

 

Use something like this on Date column. 

6 Months Average Measure =
CALCULATE(
SUM('DRE created 2020'[DRE2020]),
DATESINPERIOD('DRE created 2020'[TempColumn],LASTDATE('DRE created 2020'[TempColumn]),-6,MONTH)
)
/
CALCULATE(
DISTINCTCOUNT('DRE created 2020'[TempColumn]),
DATESINPERIOD('DRE created 2020'[TempColumn],LASTDATE('DRE created 2020'[TempColumn]),-6,MONTH)
)

 

manikumar34_0-1603194480610.png

 

Regards,

Manikumar

 





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




amitchandak
Super User
Super User

@bunny18 , you can try measure like these with a date table

 

Rolling 6 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],ENDOFMONTH(Sales[Sales Date]),-6,MONTH))
Rolling 6 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX(Sales[Sales Date]),-6,MONTH))
Rolling 6 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-6,MONTH))

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.

Top Solution Authors
Top Kudoed Authors