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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Power_BI_Adapt
Resolver I
Resolver I

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 !
@Power_BI_Adapt 
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 , @Power_BI_Adapt 

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 , @Power_BI_Adapt 

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!

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 !
@Power_BI_Adapt 
Use this Measure

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

Thanks,
Thennarasu

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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