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

Use the Column Subtotals in Matrix as YTD column

Hi, 

I'm aiming to maintain the Column Subtotal in a Matrix as YTD, while other columns represent individual months. It works perfectly without any month filters applied (the total is sum of all months, which is coincidently YTD values):

Renna_0-1711146159586.png

But applying a month filter alters the Total column to reflect only the selected month(s).

Renna_1-1711146250201.png

Can the Total column always reflect the sum of all months, unaffected by month filters?

1 ACCEPTED SOLUTION

Hi @Renna ,
Change your YTD Revenue dax as follow.

YTD Revenue = IF(ISINSCOPE('Sample Table'[Period]),
CALCULATE(SUM('Sample Table'[Revenue])),
CALCULATE(SUM('Sample Table'[Revenue]), ALL('DimDates'[Date].[Month]))
)

I only changed here.
ALL('DimDates'[Date].[Month])

Thanks

View solution in original post

6 REPLIES 6
Renna
Frequent Visitor

Hi @AUDISU ,
Thanks very much for your response. However it's not working 😔

Renna_0-1711379070343.png

 

Hi @Renna ,
Can you share your sample pbix file.

As I think you have added wrong field to ALL function.
Thanks

Renna
Frequent Visitor

Hi @AUDISU ,

This is the LINK to pbix file. Thank you very much!

Hi @Renna ,
Change your YTD Revenue dax as follow.

YTD Revenue = IF(ISINSCOPE('Sample Table'[Period]),
CALCULATE(SUM('Sample Table'[Revenue])),
CALCULATE(SUM('Sample Table'[Revenue]), ALL('DimDates'[Date].[Month]))
)

I only changed here.
ALL('DimDates'[Date].[Month])

Thanks

Renna
Frequent Visitor

It works! Thank you so much!

AUDISU
Resolver III
Resolver III

Hi @Renna ,

use INSCOPE function.
Dax query should be like follow.

Change the table and column names as your data model.
Amount = IF(INSCOPE(Calender[Month]) , CALCULATE(SUM('Sales'[SalesAmount])),CALCULATE(SUM('Sales'[SalesAmount]) , ALL(Calender[Month]))

Thanks
DISU.

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.