Forum Discussion
Agreenwood
Helper I
8 years agoDAX - Using Filter to Sum All Months by Working Day
Hi, Fairly new to DAX and been frustrated all day trying to figure this one out. There is probably a simple answer. I have a 'Dates' table which has 2 columns: 1) 'Date' (2) 'Working Day' whi...
- 8 years ago
Hi Agreenwood,
According to your formulas, it seems the monthly revenue will be accumulated. Maybe you can try these formula below. You can check it out in this file.
Measure 2 = TOTALYTD ( SUM ( Revenues[Revenue] ), Dates[Date], FILTER ( ALL ( 'Dates' ), 'Dates'[WorkingDay] <= MAX ( Dates[WorkingDay] ) ) )Measure = TOTALMTD ( SUM ( Revenues[Revenue] ), 'Dates'[Date] )
Best Regards,
Dale
Agreenwood
Helper I
8 years agoOk, I think I may have answered my own question with the following measure:
MtD Revenue = CALCULATE(SUM(Revenue[Revenue]), FILTER(ALL(Dates), Dates[workingday] <= MAX(Dates[workingday])), FILTER(ALL(Dates), Dates[Date] <= MAX(Revenue[date])))
Are there any alternative ways of completing the same, or better ways maybe?
v-jiascu-msft
Microsoft Employee
8 years agoHi Agreenwood,
According to your formulas, it seems the monthly revenue will be accumulated. Maybe you can try these formula below. You can check it out in this file.
Measure 2 =
TOTALYTD (
SUM ( Revenues[Revenue] ),
Dates[Date],
FILTER ( ALL ( 'Dates' ), 'Dates'[WorkingDay] <= MAX ( Dates[WorkingDay] ) )
)Measure = TOTALMTD ( SUM ( Revenues[Revenue] ), 'Dates'[Date] )
Best Regards,
Dale