10-16-2023 06:48 AM
I have 2 rows named row1 and row2.
1. Row1 has two members namely A and B.
2. Row2 has three members namely C,D and E.
Now, I want to add row1 and row2 so that it sum all A,B,C,D and E.
Will this work or will it just take first 2 members(i.e A and C) of each row? GetDataCell(CVR(Row1) + CVR(Row2)):Name(TotalSum)
10-16-2023 08:33 AM
OneStream is not ideal for summing on the fly, CVR/CVC allow you to specify the index number of a member within a row or column so in your example it would look something like: GetDataCell(CVR(Row1,1) + CVR(Row1,2) +CVR(Row2,1) +CVR(Row2,2) + +CVR(Row2,3)):Name(TotalSum)
However this is not very dynamic.
Do create something dynamic is a lot more difficult. I have solved the problem but I'm not sure my method is best practice so I wont share here!
10-16-2023 09:03 AM
How about
Row1 = GetDataCell("A#A + A#B): Name("Operating income (loss)")
Row2 = GetDataCell("A#C + A#D + A#E): Name("Operating income (loss)")
I want to add Row1 and Row2 in another row called Row3 without using the member filter?
10-16-2023 09:41 AM
Well I had to test this as I wasn't sure that the CVR would pull data from a getdatacell due to calc on the fly, Threw some random combination of accounts together to test and it worked 😮