Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Cal sale between dates

Hi experts,  Understand there are numbers of treads related to topic, however, I can't find any to solve my issue. Thank you for any idea and advice.  I want to calculate the total sell-in an...
  • amitchandak's avatar
    5 years ago

    Anonymous , replace the var with following

    VAR EL = DATE(year(FAST[International OCD]),month(FAST[International OCD])+2,day(FAST[International OCD]))
    VAR SL = DATE(year(FAST[International OCD]),month(FAST[International OCD])-6,day(FAST[International OCD]))

     

    or try rolling with a date tbale

    Rolling 6 till next 2 month = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],ENDOFMONTH(dateadd(Sales[Sales Date],2,month)),-6,MONTH))

     

    or use 8

    Rolling 8 till next 2 month = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],ENDOFMONTH(dateadd(Sales[Sales Date],2,month)),-8,MONTH))

     

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi amitchandak

    Thank for ðŸ˜€
    what is the difference between my DATEADD function and the DATE function you are using.