• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

YTD Calc Not Working

Hi,

I am having issues getting the YTD Calculation to work for me. I have tried about 5 different way with different functions. Please help!

My latest DAX formula for YTD Actual Amt is below. I have tried to do it by date and use use FILTER and DATESBETWEEN as well as the TOTALYTD function.

YTD Actual Amt =
VAR SelectedMonth = SELECTEDVALUE(Detail[Month])
VAR SelectedPeriod = LOOKUPVALUE(Detail[Period],Detail[Month],SelectedMonth)
RETURN CALCULATE(
[MTD Actual],
FILTER(ALL(Detail[Period]), Detail[Period] <= SelectedPeriod))

In theory, it should sum July-Nov (less than or equal to Period 5) results but it seems to only follow my MTD Calculation.

1734983990549.png
 
Finally solved this one. A side calendar table helps. I did this without it before and it worked but it would not for some reason now. I guess having a side calendar table is a good habit to get into.
 
Back
Top