cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
novicenovice Frequent Visitor
Frequent Visitor

SUMX - [SALES N-1]/[VOLUME N-1]*[VOLUME N]

Dear all,

 

I try to apply the fomula above with sumx and didn't succeed : 

 

VAR IDPREVIOUSPERIOD = 2016 //Full year

RETURN SUMX(DATA_SALES;

Calculate(sum([SALES]);ALL(Calendar);filter(Calendar;Calendar.YYYY=IDPREVIOUSPERIOD)) //[SALES N-1]

/Calculate(sum([VOLUME]);ALL(Calendar);filter(Calendar;Calendar.YYYY=IDPREVIOUSPERIOD)) //[VOLUME N-1]

*/[VOLUME] //[VOLUME N]

)

The result shows only on 2016 (and not the full year but month per month) and nothing on other period :

 

201601 = 100 instead of 1200

201602 = 100 instead of 1200

201603 = 100 instead of 1200

201604 = 100 instead of 1200

201605 = 100 instead of 1200

2017xx = 0 instead of 1200

2018xx = 0 instead of 1200

 

 

Thanks for your help

 

Novicenovice

1 REPLY 1
Community Support Team
Community Support Team

Re: SUMX - [SALES N-1]/[VOLUME N-1]*[VOLUME N]

Hi @novicenovice,

 

Could you please share your sample data to me, if you don't have confidential data? Please upload your file to One Drive and share the link here.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.