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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Suhel_Ansari
Helper V
Helper V

3 months Total DAX Measure

Hi All,

I need a Measure to calcualte the 3 Months total as shonw in follwoing screen print. please assit. Thanks

Ex : - Jan,Fab & Mar total shown be the 3 Months accross Jan,Feb & Mar (1598+1735+1659) = 4992 etc...

 

Suhel_Ansari_2-1737096243106.png

 

1 ACCEPTED SOLUTION
Bibiano_Geraldo
Super User
Super User

Hi @Suhel_Ansari ,

Please use this DAX to achieve your goal:

QuarterlyTotal = 
VAR CurrentQuarter = QUARTER(MAX('Table'[Edate]))
VAR CurrentYear = YEAR(MAX('Table'[Edate]))
RETURN
CALCULATE(
    SUM('Table'[Saless]),
    FILTER(
        ALL('Table'),
        YEAR('Table'[Edate]) = CurrentYear &&
        QUARTER('Table'[Edate]) = CurrentQuarter
    )
)

 

Your final result will look like this:

Bibiano_Geraldo_0-1737100514335.png

 

View solution in original post

4 REPLIES 4
Bibiano_Geraldo
Super User
Super User

Hi @Suhel_Ansari ,

Please use this DAX to achieve your goal:

QuarterlyTotal = 
VAR CurrentQuarter = QUARTER(MAX('Table'[Edate]))
VAR CurrentYear = YEAR(MAX('Table'[Edate]))
RETURN
CALCULATE(
    SUM('Table'[Saless]),
    FILTER(
        ALL('Table'),
        YEAR('Table'[Edate]) = CurrentYear &&
        QUARTER('Table'[Edate]) = CurrentQuarter
    )
)

 

Your final result will look like this:

Bibiano_Geraldo_0-1737100514335.png

 

uzuntasgokberk
Super User
Super User

Hello @Suhel_Ansari ,

Could you try below the dax code:
"
Total 3-Months  =
CALCULATE(
SUM('YourTable'[Sales]),
FILTER(
ALL('YourTable'[Date]),
YEAR('YourTable'[Date]) = YEAR(MAX('YourTable'[Date])) &&
QUARTER('YourTable'[Date]) = QUARTER(MAX('YourTable'[Date]))
)
)
"

 

Kind Regards,
Gökberk Uzuntaş

📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!

🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |

Suhel_Ansari
Helper V
Helper V

@Tahreem24  please assist 🙏

@Suhel_Ansari  I recommend @uzuntasgokberk solution for your case if you have multiple years. 

Otherwise try this DAX: (This only works for one year period as per your given data)

Measure 2 = CALCULATE(SUM('Table'[Sale]),FILTER(ALLSELECTED('Table'),QUARTER('Table'[Edate])<=QUARTER(MAX('Table'[Edate]))))
Tahreem24_0-1737099526242.png

 



Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Kudoed Authors