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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
jimmy7377
Frequent Visitor

Cumulative headache in a matrix

Dear games Master,

 

I have a matrix table with the followng layers

 

Fiscal Year

Fiscal Month

Team

 

I have the Colum Cost which i am looking to do a cumulative calculate against the above structure

 

First Direction i wen tin was : 

Cost **bleep** = CALCULATE(SUM('All Teams'[Cost]), 'All Teams'[Date From] <= 'All Teams'[Date From] )
But this just gives me a direct reflection of the cost column which is no good
 
 
Then i went to : 
Cumulative Total =
VAR CurrentDate = MAX('All Teams'[WeekStart].[Date])
RETURN
    CALCULATE(
        SUM('All Teams'[Cost]),
        FILTER(
            ALL('All Teams'[WeekStart]),
            'All Teams'[WeekStart].[Date] <= CurrentDate
        )
 
Week start is also on my calenmder table but i moved it into the same table as the costs for the ease of waht im doing but can easily be changed back.
 
Please someone put me out of my misory
 
jimmy7377_0-1730390595280.png

 

1 ACCEPTED SOLUTION

I could not get yours to work, the fiscal month and Year are on the calender table when i replaced them it moaned, but it did get me going and i got this to work

Cumulative =

CALCULATE

(

SUM

('All Teams'[Cost]),

FILTER

(

ALL

('All Teams'), 'All Teams'[Date From] <=

MAX

('All Teams'[Date From])))

 

 

 

thansk for your assistance

View solution in original post

2 REPLIES 2
PijushRoy
Super User
Super User

Hi @jimmy7377 

Can you please try the below DAX? If the below code not work, please keep me posted

Cumulative Cost = 
VAR CurrentMonth = MAX('All Teams'[Fiscal Month])
VAR CurrentYear = MAX('All Teams'[Fiscal Year])
RETURN
    CALCULATE(
        SUM('All Teams'[Cost]),
        FILTER(
            ALL('All Teams'),
            'All Teams'[Fiscal Year] = CurrentYear &&
            'All Teams'[Fiscal Month] <= CurrentMonth
        )
    )

 




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





I could not get yours to work, the fiscal month and Year are on the calender table when i replaced them it moaned, but it did get me going and i got this to work

Cumulative =

CALCULATE

(

SUM

('All Teams'[Cost]),

FILTER

(

ALL

('All Teams'), 'All Teams'[Date From] <=

MAX

('All Teams'[Date From])))

 

 

 

thansk for your assistance

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors