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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
alexobip
Frequent Visitor

How to sum values of a matrix in a new column

I have a table ‘Invoices’ which includes the [Date] of invoice (ex. 26/3/2022), the [Net Value] and I have created another two fields with the [Month] and the [Year] that I extract them from the invoice date. I have created the following matrix using:

alexobip_0-1668603074376.png

 

 

The matrix is as shown in picture below.

alexobip_1-1668603074382.png

 

 

I would like to use another column for each year that will show the sum of all months until that moment like the xls table bellow. The Sum column simply adds the Net Values of each month.

 

alexobip_2-1668603074388.png

 

   

Is there any way to do so?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @alexobip ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1668756047849.png

(2) We can create  a measure. 

Sum = CALCULATE(SUM(Invoices[Net Value]),Invoices[Month]<=SELECTEDVALUE(Invoices[Month]))

(3) Then the result is as follows.

Picture1.png

 

Best Regards,

Neeko Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @alexobip ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1668756047849.png

(2) We can create  a measure. 

Sum = CALCULATE(SUM(Invoices[Net Value]),Invoices[Month]<=SELECTEDVALUE(Invoices[Month]))

(3) Then the result is as follows.

Picture1.png

 

Best Regards,

Neeko Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

Shaurya
Memorable Member
Memorable Member

Hi @alexobip,

 

You can use:

 

Cumulative = CALCULATE(SUM('Table'[Net Value]),FILTER(ALL('Table'),MONTH('Table'[Invoice Date])<MAX(MONTH('Table'[Invoice Date]))))

 

Works for you? Mark this post as a solution if it does!
Check out this blog of mine: How to Export Telemetry Data from Azure IoT Central into Power BI

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.