Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213916

TOTALYTD() summing over calendar year instead of using custom for fiscal year

$
0
0

I'm using Power BI Desktop Version: 2.40.4554.463 64-bit (October, 2016)

 

I'm working on a report that compares donations/gifts by fiscal year YoY. I created a date table using

Calendar = CALENDARAUTO()

and connected the date value in the gift facts table to the date value in the Calendar table in the Modeling view.

 

Next, I created a simple SumGifts measure using this DAX:

 

SumGifts = SUM(All_Gifts_Since_2010[Gf_Amount])

 

 

Then, I created a measure for the fiscal year-to-date (FYTD) sum of donations using

SumGiftsFYTD = TOTALYTD([SumGifts], 'Calendar'[Date], "6/30")

I added the custom year_end_date to TOTALYTD as our fiscal year ends on June 30. However, the value generated for SumGiftsFYTD is the sum of gifts from January 1, 2016, to November 5, 2016, rather than from July 1, 2016, to November 5, 2016, as expected.

 

I tried a different method for calculating SumGiftsFYTD using the CALCULATE() function like this:

 

SumGiftsFYTD2 = CALCULATE(
   [SumGifts],
    DATESYTD('Calendar'[Date], "06-30"),
    ALL('Calendar'[Date])
)

However, I still get the same result. It's summing for the calendar year rather than the fiscal year.

 

My ultimate goal here is to use this in a area chart with SumGifts as the value, FiscalPeriod as the X axis, and FiscalYear as the legend, where FiscalPeriod is the fiscal month, i.e. the FiscalPeriod for  July = 1.

 

Anybody have any ideas as to what is causing this? I've tried every suggestion I can find on the internet. I suspect it's something simple.


Viewing all articles
Browse latest Browse all 213916

Trending Articles