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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

How to make a total sum for measure values within a DAX formula

Dear All,

 

I have a simple table, which contains a measure showing the difference between prices of latest month and previous month (measure called 'Delta previous price'. See below simplified example: 

Power_BI_Adapt_3-1672654389683.png

 

How can I make a total sum of the measure 'Delta previous price'? A simple SUM or SUMX does not work. 

 

Thanks for providing any suggestion.

 

2 ACCEPTED SOLUTIONS
Thennarasu_R
Responsive Resident
Responsive Resident

Hi !
@Anonymous 
Use this Measure

Previous Month=CALCULATE(SUM(Finacial[Sales]),PREVIOUSMONTH('Date'[Date]))

Thanks,
Thennarasu

View solution in original post

v-yueyunzh-msft
Community Support
Community Support

Hi , @Anonymous 

According to your description, you want to calculate the sum of a measure .

If this , you can refer to :

(1)This is my test data:

vyueyunzhmsft_0-1672712138263.png

(2)We can just create a  measure like this:

Measure = SUMX( VALUES('Table'[Date]) ,[My Measure])

(3)Then we can meet your need:

vyueyunzhmsft_1-1672712189362.png

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

7 REPLIES 7
v-yueyunzh-msft
Community Support
Community Support

Hi , @Anonymous 

According to your description, you want to calculate the sum of a measure .

If this , you can refer to :

(1)This is my test data:

vyueyunzhmsft_0-1672712138263.png

(2)We can just create a  measure like this:

Measure = SUMX( VALUES('Table'[Date]) ,[My Measure])

(3)Then we can meet your need:

vyueyunzhmsft_1-1672712189362.png

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

 

This worked perfectly for me, thank you!

Anonymous
Not applicable

Perfect! This works!

MahyarTF
Memorable Member
Memorable Member

Hi,

If you are looking for have a correct sum of the difference value, try to create the calculated column instead of the measure. it will be calculate the correct sum :

See below image that I create the new column  :

MahyarTF_0-1672656642262.png

Appreciate your Kudos and please mark it as a solution if it helps you.

Mahyartf
Anonymous
Not applicable

Hi,

If you only want to display the total account in the table, you can activate the total option in the table format. If you are going to use this value in other calculations, you can create the Running total formula with "New quick measure".

I created a demo for you, hope it helps 🙂

EzgiAslankara_0-1672655150307.png

 

EzgiAslankara_1-1672655174232.png

 

 

Thennarasu_R
Responsive Resident
Responsive Resident

Hi !
@Anonymous 
Use this Measure

Previous Month=CALCULATE(SUM(Finacial[Sales]),PREVIOUSMONTH('Date'[Date]))

Thanks,
Thennarasu
Anonymous
Not applicable

Thanks for your suggestion. How can I make this without the Date table? Looking for a solution of just make a sum on a measure. 

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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