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
WNelson
Frequent Visitor

last month total calculation divided by 3

Help! I need to find the rolling totals for last month then divide that number by 3.  This will help me find a target for number of client QA calls I need to do, as they are based on a call every 3 months.  Can some one help me with a DAX.  I am using a dateTable.  

WNelson_0-1699302962526.png

 

4 REPLIES 4
WNelson
Frequent Visitor

This is what I am struggling with:

TARGET =
  VAR __EndDate = MAX('DateTable'[Date])
    VAR __3MonthsAgo = EOMONTH(__EndDate, -3)
    VAR __StartDate = DATE(YEAR(__3MonthsAgo), MONTH(__3MonthsAgo), 1)
    VAR __Table =
        SUMMARIZE(
            FILTER(ALL('DateTable'),[Date]>=__StartDate && [Date]<=__EndDate),
            'DateTable[Month],
            "__Value",SUM('Funder Total by month'[Total])
        )
RETURN
    AVERAGEX(__Table,[__Value])
 
The purple is in error.  I am not sure what to do. 

@Greg 

This is what I am struggling with:

TARGET =
  VAR __EndDate = MAX('DateTable'[Date])
    VAR __3MonthsAgo = EOMONTH(__EndDate, -3)
    VAR __StartDate = DATE(YEAR(__3MonthsAgo), MONTH(__3MonthsAgo), 1)
    VAR __Table =
        SUMMARIZE(
            FILTER(ALL('DateTable'),[Date]>=__StartDate && [Date]<=__EndDate),
            'DateTable[Month],
            "__Value",SUM('Funder Total by month'[Total])
        )
RETURN
    AVERAGEX(__Table,[__Value])
 
The purple is in error.  I am not sure what to do. 

@Greg_Deckler 

Maybe this will better explain what I am needing.  I have the gauge to sho the number of QA calls that were done this month.  I would like the target to show the number of call that should be done.  We generally call our clients eveery 3 months.  So if I can see the average number for the last 3 months and then divide that total by 3 (every 3 months), I can find my targeet.  

WNelson_0-1699310736570.png

 

Greg_Deckler
Community Champion
Community Champion

@WNelson Use this: Better Rolling Average - Microsoft Fabric Community Just replace AVERAGE with SUM for a total instead of an average. 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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.