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
Anonymous
Not applicable

YTD over multiple years

What I would like to display is a matrix by month. I would then have a filter for year. Both the month and year dimensions would come from my calendar table.

 

So in the matrix for January, I would want the amount that shows up to be the sum of all the January amounts for the years I have selected in the year filter.

 

Then for February, I would want to do the same as described above, but also add the amounts for January to it, hence the YTD piece.

 

Then March would include both January and February as well, but for all years I have selected in my filter.

3 REPLIES 3
Anonymous
Not applicable

Do you have a dedicated Date table?

Anonymous
Not applicable

@Anonymous 

 

Yes I do. That is where the month and year dimensions referenced would be coming from.

Anonymous
Not applicable

try this measure:

 

Total Sales = SUM( 'Fact Sale'[Total Sales])

Running Total Sales = 
    CALCULATE( 
        [Total Sales], 
            FILTER( 
                ALL( DimCalendar), 
                    MAX( DimCalendar[Month]) >=DimCalendar[Month]
            )
        ,VALUES( DimCalendar[Year])
    )

This assumes you have a Month Number column in your date table, as well as a Year column. 

YTD by Month and filters on years.png

 

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!

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.