Forum Discussion
Miguelcrz
6 years agoHelper I
WEEK VARIATION
Hello, I need to have the variation % of my sales comparing it vs the last week like this: My power BI currently looks like this: And my table of time looks like this (S...
Anonymous
6 years agoNot applicable
Hi Miguelcrz,
You can try to use the following measure formula if it meets your requirement.
Measure =
VAR currWeek =
MAX ( table[Week] )
VAR prevSales =
CALCULATE (
SUM ( table[Sales] ),
FILTER ( ALLSELECTED ( table ), [Week] = currWeek - 1 )
)
RETURN
DIVIDE ( SUM ( table[Sales] ) - prevSales, prevSales, -1 )
If above not help, please provide some dummy data to help us clarify your scenario and do test coding formula on it.
Regards,
Xiaoxin Sheng