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
Mohammadwazeri
Helper II
Helper II

How To Sum up Rows One by One Until Reach Total?

Hi Guys,

 

I just come up with something I need your input on, I am not sure if there is something like Excel in Power BI.

 

This is done in Excel, 

In the screenshot below. The sum of Row 2, Column1 is 3.57% of the total of Column1($280).

Then sum of Rows 2 & 3 of Column1 is 10.71% of the total of Column1($280).

Then sum of Rows 2, 3, & 3 of Column1 is 21.43% of the total of Column1($280).

 

It keep adding rows one by one until it reach the total amount and 100%.

 

Mohammadwazeri_0-1684348563752.png

 

Thank you,

Mohammad

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

What's important to know is the order in which the numbers should appear to calculate the running total.  Should the amounts be arranged in ascending order or should they be arranged in ascending/descending order of some other field (such as date, Product).  If you need further help, then share the download link of the PBI file with your Table/matrix visual already built.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Greg_Deckler
Super User
Super User

@Mohammadwazeri You basically need a running total but for that you need something to define "earlier". 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
SivaMani
Resident Rockstar
Resident Rockstar

@Mohammadwazeri, This can be achieved with DAX Measure. Please refer the below URL
https://www.sqlbi.com/articles/using-allexcept-versus-all-and-values/

 

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.