is there a way to calculate % by taking C2/B3 then C3/B4 as shown in this sample sheet, and then C6/B6 for the last row of that group A? Do the same for B
is there a way to calculate % by taking C2/B3 then C3/B4 as shown in this sample sheet, and then C6/B6 for the last row of that group A? Do the same for B
My take is a bit complex, but will get you there. If you’re fluent with javascript you could use a java snippet node to surpass this, but alas I’m not LOL.
First, lag one of the B or C columns, your choice.
Next, In your Primary table create 3 new columns:
Column 1 Should have the math with the lagged column
Column 2 should have math thats for the last row of the group
Column 3 should be moving aggregator node to count rows by group
Create a secondary table by branching off of the primary table with a group by that finds the Max Count by Group. Lets call this value “MaxCountOfGroup”.
Join the results of this group by back to the primary table.
Grab a column expression and write the logic to pick the correct calculation from columns 1 & 2.
if ( Col3 == MaxCountOfGroup )
{ Col2 }
else
{ Col1}