Forum Discussion
JulietZhu
8 years agoHelper IV
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 ...
- 8 years ago
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
Vvelarde
8 years agoCommunity Champion
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