Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

what is ytd & mtd? where it is used?give an example with real time scenario ?

what is ytd & mtd? where it is used?give an example with real time scenario?

1 Solution

Accepted Solutions
its_anandrjs

Hi,

Let assume this simple example which explain YTD and MTD there are few transaction in dates at sales value

LOAD Date#(DateField,'DD/MM/YYYY') as DateField,Sales;

LOAD * Inline

[

DateField,Sales

24/11/2013,45234

02/01/2014,25633

24/05/2014,24886

21/08/2014,28521

11/09/2014,12569

01/11/2014,25786

11/10/2014,25692

8/11/2014,22563

];

Then in separate YTD and MTD  chart we see this concepts

YTD Calculation:

=Sum({<DateField = {'>=$(=YearStart(Today())) <=$(=Today())'}>} MetricName)

MTD  stands for the Month to date for any particular month for the metric value

MTD:

=Sum({<DateField ={'>=$(=MonthStart(Today()))<=$(=Today())'}>} MetricName)

YTD and MTD.png

Regards

Anand

View solution in original post

4 Replies
its_anandrjs

Hi,

YTD stands for Year to Date means start of the year first date to till date we want the amount value of any metrics weather it is sales, revenue etc

YTD Calculation:

=Sum({<DateField = {'>=$(=YearStart(Today())) <=$(=Today())'}>} MetricName)

MTD  stands for the Month to date for any particular month for the metric value

MTD:

=Sum({<DateField ={'>=$(=MonthStart(Today()))<=$(=Today())'}>} MetricName)

And there are many ways to calculate this

Regards

Anand

Not applicable
Author

can u illustrate with example?

its_anandrjs

Hi,

Let assume this simple example which explain YTD and MTD there are few transaction in dates at sales value

LOAD Date#(DateField,'DD/MM/YYYY') as DateField,Sales;

LOAD * Inline

[

DateField,Sales

24/11/2013,45234

02/01/2014,25633

24/05/2014,24886

21/08/2014,28521

11/09/2014,12569

01/11/2014,25786

11/10/2014,25692

8/11/2014,22563

];

Then in separate YTD and MTD  chart we see this concepts

YTD Calculation:

=Sum({<DateField = {'>=$(=YearStart(Today())) <=$(=Today())'}>} MetricName)

MTD  stands for the Month to date for any particular month for the metric value

MTD:

=Sum({<DateField ={'>=$(=MonthStart(Today()))<=$(=Today())'}>} MetricName)

YTD and MTD.png

Regards

Anand

ashfaq_haseeb
Champion III
Champion III

Hi,

Check this with example.

http://community.qlik.com/thread/129708

Regards

ASHFAQ