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

YTD

In my table month range is 01,02,03,04,05,..............

if I select 04,

how can i get YTD ? that means jan to apr value.

11 Replies
ashfaq_haseeb
Champion III
Champion III

Hi,

Check this

YTQ, QTD, MTD and WTD

Regards

ASHFAQ

Not applicable
Author

hi Ashfaq,

i can't identify solution from this. please post me an example.

thx

Rgds

Chandana

ashfaq_haseeb
Champion III
Champion III

One of the good example from Manish Kachhia

Consider that you have below dummy data….

Load
Date(Date) as Date,
Month(Date) as Month,
'Q'&
Ceil(Month(Date)/3) as Quarter,
Sales
Inline
[
Date,       Sales
01/01/2014, 100
10/01/2014, 1000
04/02/2014, 500
03/03/2014, 1200
15/03/2014, 130
25/03/2014, 200
01/04/2014, 180
21/04/2014, 300
15/05/2014, 200
20/05/2014, 100
11/06/2014, 400
12/07/2014, 220
20/07/2014, 450
01/08/2014, 600
15/08/2014, 200
17/08/2014, 220
25/08/2014, 10000
]
;

SUM({<Date = , Month =, Quarter = >}Sales)

will give you Total Sales 16000

SUM({<Date = , Month =, Quarter = , Date = {">=$(=YearStart(Today()))<=$(=Today())"}>}Sales)
will give you Total Sales For Current Year to Date

SUM({<Date = , Month =, Quarter = , Date = {">=$(=MonthStart(Today()))<=$(=Today())"}>}Sales)
will give you Total Sales for Current Quarter to Date

SUM({<Date = , Month =, Quarter = ,Date = {">=$(=QuarterStart(Today()))<=$(=Today())"}>}Sales)
Will give you Total Sales For Current Month to Date

The above YTD, QTD and MTD irrespective of Date, Month and Quarter selection as these fields are already bypassed…

Quoted from HERE

Regards

ASHFAQ

Not applicable
Author

For my example , I have month like 1,2,3,4,5,6,7,8,9,10,11,12

Then how can I do this

ashfaq_haseeb
Champion III
Champion III

Concept will be same.

You just need to fine week code

Regards

ASHFAQ

Not applicable
Author

thx

ashfaq_haseeb
Champion III
Champion III

Hi,

Can you close this thread by selecting appropriate answers

Regards

ASHFAQ

martynlloyd
Partner - Creator III
Partner - Creator III

Hi, you could construct an expression using Yearstart(), Getfieldsselections() and Max() functions.

But I'm sure best practice would be to teach your users how to select a range...

regards,

M.