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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Christian_DC
Regular Visitor

Cumulative % using Index not dates in DAX without measures

Hello Everybody,

 

Thanks for taking the time to read my question.

 

I am trying to assign a cumulative % to each row of customer data based on descending values, so that I can then add another column to label each customer 'high value' (top 80% by value), 'medium value' (next 15%) or 'low value' (final 5%).  I have tried to create this using DAX as follows:

 

Running_%

 

(In case the above picture hasn't come through properly, the column formula looks like this:)

 

Running % =
CALCULATE (
SUM ( 'Customer level'[Value %] ),
FILTER (
ALL ( 'Customer level'[Index.1] ,
'Customer level'[Index.1] <= MAX ( 'Customer level'[Index.1] )
)
)
)

 

I have added an Index column to give a rank but the above formula does not work.

 

Please help!

 

🙂

1 ACCEPTED SOLUTION

Thanks Tom.

 

I actually just got it to work by modifying my original column formula to, i.e. using 'EARLIER' instead of 'MAX' :

 

Running % =
CALCULATE (
    SUM ( 'Customer level'[Value %] ),
    ALL ( 'Customer level' ),
    'Customer level'[Index.1] <= EARLIER ( 'Customer level'[Index.1] )
)

 

Incidentally, I have subsequently tried your method but haven't quite got it to work, but I won't trouble you further.

 

Many thanks for your quick reply!

 

Christian

View solution in original post

3 REPLIES 3
TomMartens
Super User
Super User

Hey,

 

I think if you rewrite your calculated column in this way, it should work

Running % =
var currentIndex =  'Customer level'[Index.1]
return
CALCULATE (
SUM ( 'Customer level'[Value %] ),
FILTER (
  ALLEXCEPT('Customer level', 'Customer    level'[nameofyourcustomercolumn]) ,
'Customer level'[Index.1] <= currentIndex 
)
)

Hope this helps, if not please provide some sample data.

 

Regards



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Thanks Tom.

 

I actually just got it to work by modifying my original column formula to, i.e. using 'EARLIER' instead of 'MAX' :

 

Running % =
CALCULATE (
    SUM ( 'Customer level'[Value %] ),
    ALL ( 'Customer level' ),
    'Customer level'[Index.1] <= EARLIER ( 'Customer level'[Index.1] )
)

 

Incidentally, I have subsequently tried your method but haven't quite got it to work, but I won't trouble you further.

 

Many thanks for your quick reply!

 

Christian

Hey,

 

great you figured it out, but I would be a little hesitant to use

FILTER(ALL('table'), ...)

in my little sample data this leads to this result

 

Edited just realized that the column "Using Earlier" should be named "Using ALL(table)"

using all table.png

But maybe I was wrong in understanding your question not to create a cumulative sum for each customer separately.

 

Regards



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors