Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I am trying to do something equal to a sql subquery in a line chart
Assuming I have table with two fields - date and transaction_sum (can be positive or negative)
I would like to display a chart showing the history of the open debt at each date. The open debt is the sum of all transaction sums UP TO the point of that date. What expression can I use for this case (during presentation only)
You can define twice your date in the script
..
Date,
Date as dimDate ,
...
I have another idea for your problem
use Date as dimension,
use sum(transaction_sum) as expression
and click on "Full accumulation" in the expression menu.
Please Give feed back
JJ
you cant work with:
SUM(IF(DATE < transaction_sum,DEBT))
Why not
Sum( If ( date < dimDate , transaction_sum ))
where dimDate is your dimension, it could be given date depending of what you want to represent.
If you want to see each date on the graph, best is to create a calendar (see example on the community).
regards
jj
Hi
This is exactly the point when I get stuck:
Sum( If ( date < dimDate , transaction_sum ))
now, date is the date field in the condition, but what is dimDate? How do I refer to the dimension variable? In my case, date is also the dimension itself..
You can define twice your date in the script
..
Date,
Date as dimDate ,
...
I have another idea for your problem
use Date as dimension,
use sum(transaction_sum) as expression
and click on "Full accumulation" in the expression menu.
Please Give feed back
JJ
Thanks
I've played with both methods and got what I need