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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
liliachante
Frequent Visitor

cumulatives percentages

Hello, I have an excel file with two columns Items and Number, I created a measure to have the item by  category  as a percentage based on the purchase of each customer. I would like to add an additional column to calculate cumulatives of the percentage  but I

don't know how to proceed, I want to use Dax formula But I only find formula, where a column is a Number , while my data are string 

 

 

 

Capture_cumulative.PNG

Thank you in advance for your help.

best Regards, 

2 REPLIES 2
Anonymous
Not applicable

hey @liliachante 

 

use this measure.

% column = DIVIDE('Table'[Number],SUM('Table'[Number]))
Number cumulative = CALCULATE(SUM('Table'[Number]),FILTER(ALLSELECTED('Table'), 'Table'[Item]<= EARLIEST('Table'[Item])))
% cumulative = 
var sales=CALCULATE(SUM('Table'[Number]),FILTER(ALLSELECTED('Table'[Item]),ISONORAFTER('Table'[Item],MAX('Table'[Item]),DESC)))
var totalsales=CALCULATE(SUM('Table'[Number]),ALLSELECTED('Table'))
return DIVIDE(sales,totalsales)

Capture.JPG

regards,

Naveen

Thank you for you help, but I have a question, Power bI count the blank , as I have some empty line , how can I do to remove the blank?, I think create another table with the two colum and remove customer without items, do you think it's a good idea? I really apreciate you help.

 

best regards

 

Lilia

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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