How to do month to date(MTD) calculation in a module

Singh_Rahul
New Contributor

How to do month to date(MTD) calculation in a module

 
1 ACCEPTED SOLUTION

Accepted Solutions
anand.shekhawat
Super Contributor

Re: How to do month to date(MTD) calculation in a module

@Singh_Rahul 

Its not MTD. It would be YTD

Refer the below screenshot for your reference

anandshekhawat_0-1624952174757.png

 

~Anand

 

View solution in original post

5 REPLIES 5
anand.shekhawat
Super Contributor

Re: How to do month to date(MTD) calculation in a module

@Singh_Rahul 

MONTHTODATE returns a cumulative sums across a month time span for a single numeric parameter then resets it value . The syntax is MONTHTODATE(x) .Below shows the application of MONTHTODATE function

 

When you observe clearly you can see that sum of Sales for week 1 and week 2 is equal to Monthvalue of week 2 , similarly sum of week 1, week 2, week 3 and week 4 is equal to Monthvalue in Week 4.

 

Now observe the value resets in Week 5 and starts calculating again for that particular month.

anandshekhawat_1-1624946379591.png

 

Also make sure that the time should be either in days or weeks, and the formula cannot be used, if model timescale is General Weeks.

(Correction: the line item says Monthvalue , but it's MONTHTODATE)

I hope it helps

 

~Anand

Singh_Rahul
New Contributor

Re: How to do month to date(MTD) calculation in a module

@anand.shekhawat thank you for the detailed answer.

 

So for below example Monthvalue(Sales) should be 1600 correct ?

 

Rahul

anand.shekhawat
Super Contributor

Re: How to do month to date(MTD) calculation in a module

@Singh_Rahul 

No, the MONTHVALUE(Sales) would return 260 for week 1-4 , 420 for week 5-8 and so on. It actually gives the month summary value as the output. Refer the below screenshot 

anandshekhawat_0-1624950044667.png

I hope it helps

 

~Anand

Singh_Rahul
New Contributor

Re: How to do month to date(MTD) calculation in a module

Ok.

 

@anand.shekhawat  So let me put my question in the other way.

Let say the time scale is month(Jan'21,Feb'21...) and sales(100,200...likewise) so my expected output for MTD should be 300. So how to get that output.

 

Rahul

 

 

anand.shekhawat
Super Contributor

Re: How to do month to date(MTD) calculation in a module

@Singh_Rahul 

Its not MTD. It would be YTD

Refer the below screenshot for your reference

anandshekhawat_0-1624952174757.png

 

~Anand

 

View solution in original post