Forum Discussion
Rachitik67
2 years agoFrequent Visitor
Variation week over week with a baseline
Hi, i am trying to calculation the variation between weeks. However, i want the current week to be the baseline. For example : Variation current week vs week 16 = current week - week 16 / wee...
- Anonymous2 years ago
Hi Rachitik67 ,
Here are the steps you can follow:
You can use the following dax.
Calculated column:
Column = var _currentweek= MAXX(ALL('Table'),'Table'[No de Semaine]) var _currentvalue= SUMX( FILTER(ALL('Table'),'Table'[No de Semaine]=_currentweek),[Inscr_this_week]) return DIVIDE( _currentvalue - 'Table'[Inscr_this_week],'Table'[Inscr_this_week])Measure:
Measure = var _currentweek= MAXX(ALL('Table'),'Table'[No de Semaine]) var _currentvalue= SUMX( FILTER(ALL('Table'),'Table'[No de Semaine]=_currentweek),[Inscr_this_week]) return DIVIDE( _currentvalue - MAX('Table'[Inscr_this_week]),MAX('Table'[Inscr_this_week]))Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Anonymous
2 years agoNot applicable
Hi Rachitik67 ,
Here are the steps you can follow:
You can use the following dax.
Calculated column:
Column =
var _currentweek=
MAXX(ALL('Table'),'Table'[No de Semaine])
var _currentvalue=
SUMX(
FILTER(ALL('Table'),'Table'[No de Semaine]=_currentweek),[Inscr_this_week])
return
DIVIDE(
_currentvalue - 'Table'[Inscr_this_week],'Table'[Inscr_this_week])
Measure:
Measure =
var _currentweek=
MAXX(ALL('Table'),'Table'[No de Semaine])
var _currentvalue=
SUMX(
FILTER(ALL('Table'),'Table'[No de Semaine]=_currentweek),[Inscr_this_week])
return
DIVIDE(
_currentvalue - MAX('Table'[Inscr_this_week]),MAX('Table'[Inscr_this_week]))
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly