Sébastien Medhat 2 Posted June 25, 2020 Share Posted June 25, 2020 Hello, I just started using Spotfire and I am having a bit of a tough time figuring out how to create a particular calculated column, I need your help. Here attacheda sample of the data I'm working with and the calculated column (NewCol) with the results. Each Portfolio is related to another one "Attached_portfolio" except those with the value "O" in the "Porxy" column which are called portfolio model. For all Portfolio with "N" in the column "Proxy" and for each "Label", all I want to do is to : - Sum the amount value (column "Amount") with the amount value of the attached portfolio in the NewCol. For all Portfolio with "O" in the column "Proxy" and for each "Label", all I want to do is to : - Keep the same amount value in the NewCol Thank you in advanced for your help. Link to comment Share on other sites More sharing options...
Fabian Duerr Posted July 25, 2020 Share Posted July 25, 2020 First create a litlle helper column 'by label'. You can hide this column later on : Sum([Amount]) OVER ([Label])Then make your 'NewCol': case when [Proxy]="O" then [Amount] when [Proxy]="N" then [by label] endHope this works for you! (If you have more attached portfolios you have to consider them in your OVER statement) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now