Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Line chart with two dimensions, AGGR and accumulation

I'm trying to make a line graph showing the performance of multiple investment portfolios. I'm able to create this for all portfolios grouped together, with PRODDATE as the only dimension using "No accumulation" and the following formula:

exp(RANGESUM(above(
log(1+AGGR($(vPerf),PRODDATE))
,0,
RowNo())))

Trying to add the dimension SUB_PRODUCT_NAME to both the aggr expression and as a dimension produces this graph, which is not right at all

If I run the following expression, and set "Full accumulation" and change the expression to

log(1+AGGR($(vPerf),SUB_PRODUCT_NAME,PRODDATE))

I get the correct log values, but this is not what my audience is expecting, they need to see the exponential numbers (what I'm doing is calculating the product over time).

I have tried and failed so many times now, that I'm about to give up. Anyone who has an idea on how to produce a graph of the exponential values as they evolve over time (PRODDATE)?

1 Solution

Accepted Solutions
sunny_talwar

How about this?

Aggr(exp(RangeSum(Above(log(1+Aggr($(vPerf),SUB_PRODUCT_NAME, PRODDATE)), 0, RowNo()))), SUB_PRODUCT_NAME, PRODDATE)

View solution in original post

4 Replies
sunny_talwar

Try this

Aggr(exp(RangeSum(Above(log(1+Aggr($(vPerf),PRODDATE)), 0, RowNo()))), SUB_PRODUCT_NAME, PRODDATE)

Anonymous
Not applicable
Author

Thanks for the suggestion Sunny.
Unfortunatley it did not yield the correct result. I ended up with the following graph:

sunny_talwar

How about this?

Aggr(exp(RangeSum(Above(log(1+Aggr($(vPerf),SUB_PRODUCT_NAME, PRODDATE)), 0, RowNo()))), SUB_PRODUCT_NAME, PRODDATE)

Anonymous
Not applicable
Author

Just caught that myself. Thank you very much Sunny. You just made my day!