Forum Discussion
Anonymous
5 years agoNot applicable
IF statement using row in matrix
Hello, I am creating a matrix to show a breakdown of orders and the YOY completion percentage of this year compared to last year. The YOY calculation is a measure defined as follows: YOY = CA...
- 5 years ago
How about this instead?
YOY = VAR RowYear = MAX( Query2[YEAR] ) RETURN DIVIDE ( SUM ( Query2[ORDERS] ), CALCULATE ( SUM ( Query2[ORDERS] ), Query2[ORDERS] = RowYear - 1 ) )
AlexisOlson
Super User
5 years agoHow about this instead?
YOY =
VAR RowYear = MAX( Query2[YEAR] )
RETURN
DIVIDE (
SUM ( Query2[ORDERS] ),
CALCULATE ( SUM ( Query2[ORDERS] ), Query2[ORDERS] = RowYear - 1 )
)