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

Matrix Total with Date Filter

Hi all,

 

I have a matrix where the totals are not working correctly and need your expertise. What I am doing is for a time report. We have the user name as the row, the charge code where the time is charged as the column, and then the total hours as the values. But it is listing the total hours that have been entered since the start of time, and not just the past month.

Can anyone help with the DAX formula? Thanks

 

Is showing up as:

Untitled.jpg

But for Jean should be:

 

 

Untitled2.jpg

1 ACCEPTED SOLUTION
v-deddai1-msft
Community Support
Community Support

Hi @cedmiston ,

 

I suggest you use the following measure:

 

 

 

Measure =

CALCULATE (

    SUM ( 'Table'[Duration] ),

    FILTER (

        'Table',

        'Table'[Date]

            >= DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) - 1, 1 )

            && 'Table'[Date] < DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 )

    )

)

 

 

 

Untitled picture.png

 

 

If it doesn't meet your requirement, Could you please show the exact expected result based on the Tables that we have shared? 

 

For more details, please refer to the sample pbix file: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EU0LMfVjhtpDj7WQ42...

 

Best Regards,

Dedmon Dai

View solution in original post

2 REPLIES 2
v-deddai1-msft
Community Support
Community Support

Hi @cedmiston ,

 

I suggest you use the following measure:

 

 

 

Measure =

CALCULATE (

    SUM ( 'Table'[Duration] ),

    FILTER (

        'Table',

        'Table'[Date]

            >= DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) - 1, 1 )

            && 'Table'[Date] < DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 )

    )

)

 

 

 

Untitled picture.png

 

 

If it doesn't meet your requirement, Could you please show the exact expected result based on the Tables that we have shared? 

 

For more details, please refer to the sample pbix file: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EU0LMfVjhtpDj7WQ42...

 

Best Regards,

Dedmon Dai

Yes this worked thank you! Forgot to mark as solution.

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