# DAX Formula for Cumulative and %Cumulative

#### melq64

##### New Member
Hi,

I have the following dax formulas for my cumulative total and % cumulative. Its working but not showing the correct cumulative in the technical sense

Total Items Delivered:
TotalItemsDelivered:=CALCULATE(COUNTROWS('DistProfile v1-3'),FILTER('DistProfile v1-3','DistProfile v1-3'[DeliveryDate]<>BLANK()))

Cumulative Total Items Delivered:
CumulativeTotalDelivered:=IF(MIN(dCalenderDelivery[Date])>CALCULATE(MAX('DistProfile v1-3'[DeliveryDate]),ALL('DistProfile v1-3')),BLANK(),CALCULATE(COUNTROWS('DistProfile v1-3'),FILTER(ALL(dCalenderDelivery),dCalenderDelivery[Date]<=MAX(dCalenderDelivery[Date]))))

%Cumulative Total Items Delivered:
%CumulativeTotalDelivered:=DIVIDE([CumulativeTotalDelivered],CALCULATE([CumulativeTotalDelivered],ALLSELECTED('DistProfile v1-3'[Delivery Days])))

Here is screenshot of the output pivot table based on the above % Cumulative formula:

Appreciate any help

### Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

1,089,299
Messages
5,407,447
Members
403,143
Latest member
CTremblay