Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
priyav24
Creator II
Creator II

Calculation of MTD and YTD

Hello Everybody!!

I need Calculation for MTD & YTD..

Thank in Advance,

Priya

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi priya

Load

If(InYearToDate([Date_Field],today(),0),true(),false()) as YTD,

If(InMonthToDate([Date_Field],today(),0),true(),false()) as MTD

From......

[Date_Field] - Date used in your application.

You can use the YTD or MTD value in Front end like, Sum(SalesAmount*YTD) or Sum(SalesAmount*MTD) which gives you the sum of sales amount for the year till date or month till date respectively. To help full this answer

View solution in original post

5 Replies
Sokkorn
Master
Master

Hi Priya,

Your requirement is not so clear while we don't have sample App or data that you looking for. Anyhow, here is some idea to get start.

Regards,

Sokkorn

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Have a look at the link

     http://community.qlik.com/docs/DOC-4321

     Have a look at the point in time application on below post.

    

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

Regards,

Kaushik Solanki    

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable

Hi priya

Load

If(InYearToDate([Date_Field],today(),0),true(),false()) as YTD,

If(InMonthToDate([Date_Field],today(),0),true(),false()) as MTD

From......

[Date_Field] - Date used in your application.

You can use the YTD or MTD value in Front end like, Sum(SalesAmount*YTD) or Sum(SalesAmount*MTD) which gives you the sum of sales amount for the year till date or month till date respectively. To help full this answer

priyav24
Creator II
Creator II
Author

Thank you Kaushik

priyav24
Creator II
Creator II
Author

Thanks Shivaji