Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Calculate Static Quarter Sales

Hi experts!🤗

I am trying to create a table that has average quarter sales from July'2018, until today


So I would have somethiing like that:

 JAS'18 (july, aug & sep)OND'18 (oct, nov & dec)JFM'19AMJ'19
salesxxxxxxxxxxxxxxxxxx

 

However, when I apply my formulas, the same data showed for two different quarters, as below:


and these are the formulas I used:

JAS'19 = CALCULATE(SUM('BASE_­SELL_OUT (2)'[Sell Out(MSU)]),DATESINPERIOD(Amonth[AMonth],07/01/2019,2,MONTH))/3
OND'19 = CALCULATE(SUM('BASE_­SELL_OUT (2)'[Sell Out(MSU)]),DATESINPERIOD(Amonth[AMonth],10/01/2019,2,MONTH))/3

the only thing I changed was the starting month, so it would change the Quarter
I already have a separate month data table.
 
Could you please help me solve this? 
thanksss 🙂
  • @yohandipt, try adjusting the date in a DATE function:

    JAS'19 =
    CALCULATE (
        SUM ( 'BASE_­SELL_OUT (2)'[Sell Out(MSU)] ),
        DATESINPERIOD ( Amonth[AMonth], DATE ( 2019, 07, 01 ), 2, MONTH )
    ) / 3

2 Replies