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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
User1021
New Member

SUM MTD if multiple months are selected in filter

Hello All

 

My date table is fiscal calendar 445.

 

I have created below DAX for MTD 

 

MTD =
    CALCULATE (
        SUM ( 'Sales invoice line fact'[Invoice TON_] ),
        FILTER (
            ALL ( 'Report date' ),
            'Report date'[Report year] = VALUES ( 'Report date'[Report year] )
                && 'Report date'[Report month] = VALUES ( 'Report date'[Report month] )
                && 'Report date'[Report date] <= MAX ( 'Report date'[Report date] )
        )
    )
 
User1021_0-1694591484505.png

Currently when i am trying to select multiple months it does not provide any output in grid . I want to enahnce \ my DAX to give me sum of MTD if multple months are selected  in filter

5 REPLIES 5
some_bih
Super User
Super User

Hi @User1021  to proper use MTD values, it is the best when you have Date / Calendar table

 

In your case, measure MTD could be:

MTD test = TOTALMTD(SUM ( 'Sales invoice line fact'[Invoice TON_] ),'Date'[Date])

'Date'[Date] should be your Calendar / Date key column connected with your table

Create Calendar Table Microsoft Learn

https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-calculated-tables 

 

TOTALMTD Fuction

https://learn.microsoft.com/en-us/dax/totalmtd-function-dax?WT.mc_id=DP-MVP-4025372 

 

Did I answer your question? Kudos appreciated / accept solution!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






TOTALMTD function will not work as I  have mentioned that my date table is fiscal calendar 445.

Hi @User1021 I only saw MTD🙂

check link below, could be usefull for your case

https://www.linkedin.com/pulse/creating-4-4-5-fiscal-calendar-power-bi-dax-norman-maxwell/ 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






The link is not for calculation of MTD

Hi @User1021 

On link there is part as below, maybe you did not see it already.

 

some_bih_0-1694615412896.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.