Gaines Myer Posted July 16, 2020 Posted July 16, 2020 I am trying to sum all values based on B and subtract from that total all values based on A. My graph I am looking for I want the Date in my x axis and the volume as my y axis. Name volume Date A 50 7/14/2020 B 100 7/14/2020 C 25 7/14/2020 A 40 7/15/2020 B 80 7/15/2020 C 20 7/15/2020 A 10 7/16/2020 B 50 7/16/2020 C 5 7/16/2020
Gaines Myer Posted July 16, 2020 Author Posted July 16, 2020 I am currently using this in my custom expression and using my filters to filter out C. It seems a little sloppy so I was wondering if maybe someone has a better format. Sum(If([Name]="B",[Volume],-[Volume]))
Fabian Duerr Posted July 17, 2020 Posted July 17, 2020 I suggest to pivot your data table. Please see the attached PNG file. Then you can easily calculate 'B minus A' and the rolling sum of 'B minus A'. Sum([b minus A]) OVER (AllPrevious([Date]))Use the rolling sum on your y-axis and Date on x-axis. The resulting table will look like this:
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