Forum Discussion

JulietZhu's avatar
JulietZhu
Helper IV
8 years ago
Solved

Total weekday payment for last 3 months

Need calcute the total weekday payment for past 3 months. Use the following DAX, but return blank. IsWorkingDay column in calendar table shows 1 for weekday, 0 for weekend. The logic is correct, but ...
  • Vvelarde's avatar
    Vvelarde
    8 years ago

    JulietZhu

     

    Try with this:

     

    _SumPaymentWeekdayLast3M2 =
    CALCULATE (
        SUM ( DataFromDB[Payment_Amt] );
        FILTER (
            ALL ( CalendarTable );
            CalendarTable[Date]
                <= EOMONTH ( TODAY (); -4 ) + 1
                && CalendarTable[Date] <= EOMONTH ( TODAY (); -1 )
                && CalendarTable[IsWorkingDay] = 1
        )
    )
    

    Regards

     

    Victor

    Lima - Peru