Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Accumulate Month wise in table

Hi all,

I am trying to achieve cumulative sum in table chart month wise. I have attached a sample.

Till now I could get till this,

=RangeSum(Above(If(Only(Transaction_Date)=min(total  Transaction_Date), Sum(P_AND_L)/Sum(OPENING_CAPITAL),

((( Sum(P_AND_L)/Sum(OPENING_CAPITAL))+1)*rangesum(above(P_AND_L)/(OPENING_CAPITAL)))-1)), 0, NoOfRows())

Any help on this? Even i need to find best and worst value in accumulated sums.

12 Replies
YoussefBelloum
Champion
Champion

Hi,

here I see two transaction dates..

also can you explain the calculation rule ?

starting from your expression just translate your conditions, how do you want to calculate your cumulative values

Anonymous
Not applicable
Author

I want to calculate the MTD value. Transaction Dates are just arranged in Month wise .

First I want to calculate TDY which is Pnl/opening capital and then accumulate it.

YoussefBelloum
Champion
Champion

It is ok, I'm asking the question because you'ill be able to calculate your MTD using these fields.

did you copy and paste these columns manually on this file ?

Anonymous
Not applicable
Author

Yes

YoussefBelloum
Champion
Champion

That's what I thought, you paste the columns the wrong way, you should just concatenate them actually instead of doing this, otherwise you will have to do it in the script.

so what is your original file structure ?

Anonymous
Not applicable
Author

I am attaching my file structure and i want to calculate column G in it.

YoussefBelloum
Champion
Champion

with this structure, you can't do nothing,

  • there is no dimension column for the X-axis (so no cumulative/Range values).

  • there is no Date column
Anonymous
Not applicable
Author

I want to achieve accumulation using Transaction_Date as dimension in table chart.

That is the Date column you are talking about?

YoussefBelloum
Champion
Champion

Yes, that's it.

the problem is that you have a wrong structure, I'ill explain with an example:

you file now (i removed some columns)

OPENING_CAPITALTRANSACTION_DATEOPENING_CAPITALTRANSACTION_DATE
1129669503-mai-161030920701-juin-16
1075621904-mai-161034478102-juin-16
1081834005-mai-161043060603-juin-16
1071685706-mai-161057889807-juin-16

you should have it like this:

 

OPENING_CAPITALTRANSACTION_DATE
1129669503-mai-16
1075621904-mai-16
1081834005-mai-16
1071685706-mai-16
1030920701-juin-16
1034478102-juin-16
1043060603-juin-16
1057889807-juin-16

hope it is clear