Cumulative Total and Percentage using PowerPivot

melq64

New Member
Joined
Aug 21, 2017
Messages
49
Hi,

I created two functions for cumulative total and percentage:

CumulativeTotalDelivered:=CALCULATE([TotalItemsDelivered],FILTER(ALL(dCalenderDel),dCalenderDel[Date]<=MAX(dCalenderDel[Date])),VALUES(dCalenderDel[Date]))


%CumulativeTotalDelivered:=DIVIDE([CumulativeTotalDelivered],CALCULATE([CumulativeTotalDelivered],ALLEXCEPT(dCalenderDel,dCalenderDel[Year])))

The output result (via pivot table) is not quite right as seen in image screenshot below:

https://drive.google.com/file/d/1RwHkJLt1S24cM4kZmcOg3HE6MQKdtTCr/view?usp=sharing

I need the cumulative % result to add up to 100% from LEFT to RIGHT and not top to bottom as shown in image above. Hope that makes sense.

Please let me know if you need further clarification.

Appreciate any help.


Thanks:)
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Thanks for the suggestion VBA Geek but after changing formula to include ALLSELECTED, the values in pivot all changed to 100%

Here's the actual dataset that my functions are referencing so hope that will provide you with more context.

https://drive.google.com/file/d/1cE2Ui4sBlHUwjFExBvcii29lL5o8R2mf/view?usp=sharing

FYI here's the function for TotalItemsDelivered mentioned earlier:

TotalItemsDelivered:=CALCULATE(COUNTROWS('Cumulative dataset'),FILTER('Cumulative dataset','Cumulative dataset'[Delivery]<>BLANK()))

Also note that for [Delivery] column, I created at separate calendar table named 'dCalendarDel'

Please let me know if you need further details.

Again I appreciate any help you can provide.


Thanks:)
 
Upvote 0
Sorry forgot to mention in the dataset file, the highlighted columns WERE calculated columns with formulas but I've replaced them with values only.
 
Upvote 0
Hi, just wanting to follow up if you managed to create correct DAX formula for the issue? Hope to hear from you soon.

Thanks:)
 
Upvote 0
My apologies. Please ignore my last message as I just found the dax function within attachment.

Thank you again for your help with this. Truly appreciate it:)
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top