cancel
Showing results for
Did you mean:

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Helper I

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
Super User

Hope this helps.

Regards,
Ashish Mathur
http://www.ashishmathur.com
5 REPLIES 5
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
Helper I

Hi

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

Super User

Hope this helps.

Regards,
Ashish Mathur
http://www.ashishmathur.com
Community Champion

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

Helper I

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(....)