Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Struck in CSum

Status
Not open for further replies.

gauge

Programmer
Joined
Feb 2, 2005
Messages
2
Location
AU
Hello,
I am struggling with Cumulative Sum in MicroStrategy based on combination of two attributes say BranchID and Date and also with CityId and Date i.e. i want to sum based on
ascending order of date.

This is the data I have:

BranchID City Date Amount
________________________________________________________

B1 C1 1/13/02 150
B1 C1 1/14/02 150
B1 C2 1/14/02 650
B2 C1 1/15/02 300
B2 C2 1/18/02 500
B2 C2 1/19/02 500
B3 C1 1/18/02 450
B3 C2 1/16/02 450

I am looking for a report like this with csum based on asc order of branch and date

BranchID Date Amount CSum
________________________________________________________

B1 1/13/02 150 150
B1 1/14/02 800 950

B2 1/15/02 300 300
B2 1/18/02 500 800
B2 1/19/02 500 1300

B3 1/16/02 450 450
B3 1/18/02 450 900

i also want to do csum based on asc order of branch, city and date


BranchID City Date Amount CSum
____________________________________________________________________

B1 C1 1/13/02 150 150
B1 C1 1/14/02 150 300
B1 C2 1/14/02 650 650

B2 C1 1/15/02 300 300
B2 C2 1/15/02 500 500
B2 C2 1/18/02 500 1000

B3 C1 1/16/02 450 450
B3 C2 1/18/02 450 450

Thanks
 
when you are in the metric editor, highlight the runningsum in the definition and rightmouseclick, select parameters. You'll see a break by tab and a sort by tab.

for break-by select branch

and do the same for your sort by.

You'll see it, it's quite intuitive, just hard to find.
 
Dear gauge,
Another solution is to create a MTD (month to date) transformation table and add it to the metric.
However I thing that nlim solution is more polite.

Sincerely,
Humberto Seiji Fukuda
If you need more instruction to solve it, contact me.
cogubr@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top