Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
deblina_rai
Contributor III
Contributor III

YTD calculation for each date

Date

Acc

Rep

Other Dims

Trxn Amt

YTD

1/5/2019

AccA

RepX

XXXX

25

25

2/10/2019

AccA

RepX

XXXX

75

100

7/15/2019

AccA

RepX

XXXX

80

180

2/10/2019

AccB

RepY

YYYY

20

20

7/18/2019

AccB

RepY

YYYY

40

60

 

 

I need YTD column to be populated for each row.

such as for 5th jan it will give sales  from 1st jan to 5th  jan

for 2/10/2019 it will give sales from 1st jan to 10 the feb  and so on 

 

Please help me on that

Labels (2)
13 Replies
deblina_rai
Contributor III
Contributor III
Author

can you please tell me how to set year start date and as of date as range limit in rangesum function?

 

kaanerisen
Creator III
Creator III

Hi Deblina,

You can try the expression below.

aggr(RangeSum(above(sum([Trxn Amt]),0,RowNo())),Acc,Date)

Untitled.png

deblina_rai
Contributor III
Contributor III
Author

its not giving proper result. we cant set 0 as start range . Its just adding current row result with above rows. so when I am selecting account no in filter its giving correct but with out  anyselection datewise  this expression is not working.

aggr(rangesum(above( Sum({$<[X529 Special Trade Ind]={'Y'},
[Advisory Platform Ind]-={"=len([Advisory Platform Ind])=0"}>}[Sales Amt]) ,0,rowNo())),[acct number],[Process Date])

 

is there any way to set upper range as year start date and lower range as as of that date.

sunny_talwar

I am not sure I understand your question... would you be able to share a sample and the output expected out of it?