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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.