Forum Discussion
Anonymous
3 years agoNot applicable
Calculate date filter
Hello, I ve been trying to improve my calculation with additional date filter, but it doesnt make any diff. It behaves like it calculates the result for all dates Everything is calcula...
- 3 years ago
Anonymous
Please tryYield Mech. assemblyprevmonth = VAR CurrentYearMonth = MAX ( 'Date'[Year Month Number] ) VAR MechAssembly = CALCULATETABLE ( TJob, TJob[SekundærNavn] = "Mech. assembly", 'Date'[Year Month Number] = CurrentYearMonth - 1, ALL ( 'Date' ) ) RETURN ROUND ( DIVIDE ( SUMX ( MechAssembly, TJob[FirstPassQty] ), SUMX ( MechAssembly, TJob[Antal] ) ), 4 )
Anonymous
3 years agoNot applicable
Hi Anonymous ,
Please try this measure:
(Try PARALLELPERIOD(TJob[Dato],-1,MONTH) instead of PREVIOUSMONTH(TJob[Dato]))
PrevMonth =
CALCULATE(SUMX(Sales, Sales[Unit Cost]), PARALLELPERIOD('Date'[Date],-1,MONTH))
Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous3 years agoNot applicable
Anonymous Calculated you presented isnt filtering any date. Its result of sumx with function all to each month? Could you try to download contoso file. Maybe my settings for file are disrupting the calculation... I m running out of ideas