locked
MTD problems RRS feed

  • Question

  • I have a powerpivot report that shows the 12 months of each year.  A sales column is compared to a sales column from the previous year.  Everything works great except for the current month.  It is showing a month end total for January 2013 and I need it to show the same time period as the current month.  Any ideas on how to get the current MTD and LY MTD to work across all months? I need it to appear as the latter example below for the current month.

    ty ly TY LY
    $9,132.72 $350,900.23 $9,132.72 $13,180.67


     

    MTD:=CALCULATE(SUM([AMT]),Query[ACCOUNTNUM], DATESBETWEEN(Dim_Time[DateValue], FIRSTDATE(Dim_Time[DateValue]), TODAY()))
    
    
    MTD LY:=if(SUM([AMT])=0,BLANK(),CALCULATE(SUM([AMT]),Query[ACCOUNTNUM],SAMEPERIODLASTYEAR( DATESBETWEEN(Dim_Time[DateValue], FIRSTDATE(Dim_Time[DateValue]), TODAY()))))


    Wednesday, January 15, 2014 3:49 PM

Answers

All replies