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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.