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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

CUMULATIVE POURCENTAGE

Hi

I want to calculate a cumulative % by a DAX Formula (See **bleep**%)

How ?

Client       PURCHASES           %                 **bleep**% 

XX             100                      10%                10%

YY               20                        2%                12%

AA             300                      30%               42%

KK             240                       24%               66%

FF              340                       34%             100%

TOTAL      1000                     100%             100%

1 ACCEPTED SOLUTION

You may download my PBI file from here.

Hope this helps.

Untitled.png


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

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

What decides the order of the Clients?  Why is KK after XX and so on?  Clarify that.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi

Is done randomly here in my example but on the real work will be ordered from the biggest purshase till the lowest

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
themistoklis
Community Champion
Community Champion

@Anonymous 

Try the following formulas:

 

Column_Cumulative_Purchases = 
CALCULATE (
    SUM ( Sheet1[Purchases]),
    ALL ( 'Sheet1' ),
    Sheet1[Client] <= EARLIER ( Sheet1[Client])
)

 

Columnn Cumulative_Purchases % = 
var _totalpurchases = CALCULATE(SUM(Sheet1[Purchases]),ALL(Sheet1))
RETURN
CALCULATE (
    SUM ( Sheet1[Purchases]),
    ALL ( 'Sheet1' ),
    Sheet1[Client] <= EARLIER ( Sheet1[Client])
) / _totalpurchases

 

See attached file 

Anonymous
Not applicable

Hi

Thank you for your effort but i want it on a dax formula to put on a matrix not on a table cause i have thousand of lines, so the purchases per client is calculated with a formula (sum(....)

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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