Forum Discussion

IAmCare's avatar
IAmCare
Frequent Visitor
8 years ago

SAMEPERIODLASTYEAR with cumulative column

Hello,  I am trying to cumulate units available monhtly for the last fiscal month.  I wrote this measure and it works perfectly until i dry to add SamePeriodAsLastYear.  If i leave off Invoice_DimDate[IsCurrentFiscalYear] = 1) then it works but it goes back to the begining of time for the data and the unit couts are huge.   I just want the  current fiscal year.  Can anybody helpme get the current year unit counts and the previous year unit counts?

 

 

YearRunningTotal =
CALCULATE (
    COUNTROWS( 'Invoice Fact_WIPDaily'),
    FILTER (
        ALL ( 'Invoice Fact_WIPDaily' ),
        'Invoice Fact_WIPDaily'[INV DATE (I10)]<= max('Invoice Fact_WIPDaily'[INV DATE (I10)])),Invoice_DimDate[IsCurrentFiscalYear] = 1)

 

No RepliesBe the first to reply