DAX DATESYTD Problem with zero values

Julie H

New Member
Joined
Jul 9, 2015
Messages
1
Hi,

I'm trying to create a pivot table with items in the row labels, year/month in the column labels and then calculate year to date, here's my formula =CALCULATE(SUM(capex[Amount]),DATESYTD(capex[Date]),ALL(capex))

This works fine unless any of the items have no values in a particular month. Then the pivot table just shows 0 for that month, what I want (not sure if its possible) is for those with a zero value to show the previous month's cumulative value.

Any help gratefully received

Thanks
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
You are not using DATESYTD correctly. You need to use a calendar table and there should be no reason to use ALL(). Also make sure you mark the calendar table as a date table.
 
Upvote 0

Forum statistics

Threads
1,224,109
Messages
6,176,415
Members
452,728
Latest member
mihael546

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