Forum Discussion
There are two ways to do this. However you don't state what your "business rule" is for retrieving the top 5 sorted clients. I assume your clients are in a UD dimension? Is the ranked list currently using a custom member list, or is it an XFBR string that returns the member names inside a string? This cumulative ranking would be easier to do if the client detail was in a relational table and reported in OS using relational blend. Be careful about data unit sizes when consolidating these. Anyway, back to the cumulative ranking question:
Option 1) Use your existing custom member list or XFBR to retrieve the top 5 sorted clients, as you are probably doing at the moment. Then you would need a UD8 DynamicCalc for the cumulative element. This DynamicCalc would have to re-generate the top 5 sorted clients (again) in a list in memory, and aggregate the amount, up until the point that the client is the member that is being displayed on this row (from api.pov). For performance , once the DynamicCalc has re-generated the ranked list of clients with their amounts (in a List or Dictionary), then store it in the BRGLobals , so it doesn't have to re-generate the list on every row.
Option 2) Since you are only looking at top 5, you could design the cube view with 5 fixed "design rows" (excluding totals etc). In each row in your cube view design, say XFBR( HelperRule, GetRankedClient, Rank=1) for the first row, through to XFBR( HelperRule, GetRankedClient, Rank=5) on the last row. This makes the cube view design more fixed/less flexible, but it makes the accumulation of amounts MUCH easier because then you can just use the Cube View CVR functions (as documented in the design & reference guide). So row 2 would be a CVR expression of Row1+Row2.... up to Row 5 that would be a CVR expression =Row1+Row2+Row3+Row4+Row5
With more background info (which dimension types your are using etc, what sort of business rule do you have for the ranking already) then I might have a suitable example that best-fits your particular case.
Related Content
- 2 years ago
- 2 years ago
- 2 years ago
- 3 years ago
- 11 months ago