Forum Discussion
KG1
3 years agoResolver I
Measure Interpretation
Hi I am working on a dashboard that has been developed by someone else I am struggling to breakdown this measure and what it is actually doing = CALCULATE(COUNTA('Export'[Order]),DATESBE...
- 3 years ago
Its easier to read if its properly formatted
CALCULATE ( COUNTA ( 'Export'[Order] ), DATESBETWEEN ( 'Export'[Actual_Finish_date], MAX ( 'Export'[Actual_Finish_date] ) - WEEKDAY ( MAX ( 'Export'[Actual_Finish_date] ), 3 ), MAX ( 'Export'[Actual_Finish_date] ) ) )So
MAX ( 'Export'[Actual_Finish_date] ) - WEEKDAY ( MAX ( 'Export'[Actual_Finish_date] ), 3 )gives the Monday of the relevant date. Using that as a parameter to DATESBETWEEN it is counting the number of orders within that week.
johnt75
3 years agoSuper User
I think its counting the number of orders in a given week, starting from the Monday
- KG13 years agoResolver I
What is the purpose of this part of the measure? weekday(max('Export'[Actual_Finish_date]),3), ?
Thank you
- johnt753 years agoSuper User
Its easier to read if its properly formatted
CALCULATE ( COUNTA ( 'Export'[Order] ), DATESBETWEEN ( 'Export'[Actual_Finish_date], MAX ( 'Export'[Actual_Finish_date] ) - WEEKDAY ( MAX ( 'Export'[Actual_Finish_date] ), 3 ), MAX ( 'Export'[Actual_Finish_date] ) ) )So
MAX ( 'Export'[Actual_Finish_date] ) - WEEKDAY ( MAX ( 'Export'[Actual_Finish_date] ), 3 )gives the Monday of the relevant date. Using that as a parameter to DATESBETWEEN it is counting the number of orders within that week.