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

Referencing expression from row above

Hello,

I have tried using the Above() function for this, but it is not working as I hoped or I am doing something wrong. The attached spreadsheet illustrates the type of calcs and functionality I am looking to replicate in QV. I am assuming that I start with $100 in cash and buy something so the ending balance is the starting balance less what I have bought. The beginning balance for the next row is the ending balance from the row above. For each row > 1 I earn interest on the beginning cash balance which becomes part of the ending cash balance.

I need to make the "something" that I buy/sell dynamic in that the user can enter a "multiplier" to increase the size and have everything dynamically recalculate. The calc I cannot figure out is the beginning cash balance for RowNum > 1

Any help/advice is appreciated.

Chris

1 Solution

Accepted Solutions
sunny_talwar

The problem was that Net BuySell is null and when you do something like this

Not Null + Null = Null

But, this works

RangeSum(Not Null, Null) = Not Null

I hope this will clarify your doubts.

I would suggest closing this thread by marking Correct and/or helpful responses so that future visitors can benefits here.

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny

View solution in original post

3 Replies
sunny_talwar

End share calculation seems different, otherwise it seems to be working

Capture.PNG

Anonymous
Not applicable
Author

Thank you Sunny!

I have to admit I am not really sure why the RangeSum function is necessary, but it seems to work. I will have to read up to understand your solution better.

Chris

sunny_talwar

The problem was that Net BuySell is null and when you do something like this

Not Null + Null = Null

But, this works

RangeSum(Not Null, Null) = Not Null

I hope this will clarify your doubts.

I would suggest closing this thread by marking Correct and/or helpful responses so that future visitors can benefits here.

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny