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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

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
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.

March Power BI Update Carousel

Power BI Community Update - March 2026

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