Forum Discussion
ScottBrown
4 years agoHelper II
DAX Help - Partially created from Time Intelligence
I need filtering this down a little further,
- Need to filter the weekIndex to be greater than or equal to -20
- How do I round the answer = currently is 22.67 which is correct
AVG Weekly Production Last 20 Wks =
AVERAGEX(
KEEPFILTERS(VALUES('DimDates'[weekIndex])),
CALCULATE(COUNT('Production_Stock_OrderLines_HIST-PROD'[txtOrdNo])
))
Thnaks in Advance
Is this what you mean?
AVG Weekly Production Last 20 Wks = ROUND ( AVERAGEX ( FILTER ( VALUES ( 'DimDates'[weekIndex] ), 'DimDates'[weekIndex] >= -20 ), CALCULATE ( COUNT ( 'Production_Stock_OrderLines_HIST-PROD'[txtOrdNo] ) ) ), 0 )
2 Replies
- AlexisOlsonSuper User
Is this what you mean?
AVG Weekly Production Last 20 Wks = ROUND ( AVERAGEX ( FILTER ( VALUES ( 'DimDates'[weekIndex] ), 'DimDates'[weekIndex] >= -20 ), CALCULATE ( COUNT ( 'Production_Stock_OrderLines_HIST-PROD'[txtOrdNo] ) ) ), 0 )- ScottBrownHelper II
Thank You very much for the help.