Totalytd

luirib

Board Regular
Joined
Sep 21, 2005
Messages
56
I am stumped with what seems to be a simple formula. I need to create a measure that calculates the YTD totals for each row. This is what I have:

TOTALYTD ( sum ( Fact[Amount] ) , 'Date'[Date] , ALL ('Date'))

'Date'[Date] is the table where I store all possible dates and months.

The problem I am getting is that this formula is showing totals for all the periods I have on the database, not just for the current year or up to the month I'm running the report to (e.g., if I run a report for March 2012, it shows the info for 2010, 2011 and thru Dec of 2012). It must be a filter that I am not applying, but I cannot make sense out of it. Dec 31 is our year end.

Any lead will be greatly appreciated.
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
is not clear about your data. THe total for the row? Are there multiple columns with different dates/years? Would you post a sample of your data layout? If you can't use one of the html apps to post your data, you can put borders around your data and then copy/paste it into your post.
 
Upvote 0
What I'm building is an Income Stmt. This is the layout:
Month YTD
Revenue
Revenue South 100 1,200
Revenue North 125 2,356
Revenue West 215 4,136
Revenue East 117 856

Month is a column of the Fact table.
YTD is a calculated measure where I put the formula that is not working.

Revenue is the first level of filter I apply in row labels.
Revenue South/North/West/East is the second filter I apply in row labels.

My Date table has 2 columns as follows:
Date: M/D/YYYY (Date format)
Period: YYYY-M (Text format)

Fact table and Date tables have a relationship b/w Transaction date and Date.

Is this enough info? Thanks.
 
Upvote 0
ok so I see this

Excel 2010
ABCD
1MonthYTD
2Revenue
3RevenueSouth1001,200
4RevenueNorth1252,356
5RevenueWest2154,136
6RevenueEast117856
Fact Table


Excel 2010
AB
1DatePeriod
26/5/20122012-6
MyDate


but I don't see a relationship between the two
 
Upvote 0
BTW the second table make the period a formula and format as yyyy-d

Excel 2010
AB
1DatePeriod
26/5/20122012-6
MyDate
Cell Formulas
RangeFormula
B2=+A2
 
Upvote 0
oh never mind I see that this is a PowerPivot question - forget what I just posted. I don't like the "zero reply" link
 
Upvote 0
Hard to tell what your filters are but my formula is =CALCULATE([Actuals],DATESYTD(qryActuals[Date]),all(Dates[Month])) so change your DimDates table to FactDates.
 
Upvote 0
What happens when you take out ALL ('Date')? You only really need to use the second argument if you have an alternative Year end date.
 
Upvote 0

Forum statistics

Threads
1,223,933
Messages
6,175,476
Members
452,646
Latest member
tudou

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