runningSum multiple partitions

Hello,

I want to have cumulative pnl over a period of time with proper drill-downs. So, I created a custom calculation:

Cumulative PnL → runningSum(sum({daily_pl}), [{as_of_date} ASC], [symbol, fund])

Now, I am having a chart with x-axis with as_of_date and y-axis with this cumulative pnl. It gives me error:

Can you please advise?
Thank you.

Hi @harpar1808

I see you have included all the fields used in your runnungSum in the visual. Is daily_pl by any chance a calculated field and has any othere references?

That may be the problem.

Regards,
Giri

No. Its a regular field in the dataset.

When I hit the “Show details” button, below comes up:

This error is not telling me the core issue.
Can you plz advise?

Hi @harpar1808

The error is basically indicating that one or more fields used in your runningSum is missing in the visual and hence can not calculate the metric.

But based on your screenshot you have included all the fields in the calculated field on the visual and they hence should be available for the computation to take place.

Can you try changing the visual as pivot table and include as_of_date, symbol, fund in the rows and the cumulative P&L on the values section and see if it computes?

Regards,
Giri

Hello,

yes that does work:

It even works if I put other dimension in Small Multiples section:

Hi @harpar1808

I looked around the community where people had similar issues. So the root cause of the issue is that the visual does not have the required fields in the specific way it needs to compute.

Looking at the line chart with the error when you included Fund and symbol to the Color section it appears to me that the grouping at as_of_date, fund happens and symbol is probably considere a sub-group under that or something like that.

But when you included the fields in the pivot they were all at the same level and the same when you inluded fund in color and symbol in small multiples.

I don’t have a solution yet; but will try to simulate an example and let you know what i find out.

Hello @Giridhar.Prabhu – Any update here?

Hi @harpar1808,

It’s been awhile since last communication took place on this thread; are you still encountering the same issue or were you able to find a work around in the interim?

If still working on this, it may be easier to assist further if you’re able to upload a copy of your analysis with anonymized data to Quick Sight Arena; that way we can test out some various options to see how your visuals react.

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you

Hi @harpar1808,

Since we have not heard back, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community and link this discussion for relevant information if needed.

thank you