Francisco Aspillaga Posted November 17, 2022 Share Posted November 17, 2022 Hello, how is the accumulated % of the total calculated in a graph, and how would the formula for the calculation be: SUMIF Link to comment Share on other sites More sharing options...
Solution Fredrik Rosell Posted November 17, 2022 Solution Share Posted November 17, 2022 Hello,I don't know if this is exactly what you were looking for (if not, please clarify), but below is an example.In the bar chart to the left (green), I plot the accumulated % of total, using this expression: Sum([Measurement]) THEN Sum([Value]) OVER (AllPrevious([Axis.X])) / Sum([Value]) OVER (All([Axis.X]))In the bar chart to the right (purple), I plot the accumulated % of total, but only use the values for which Category is "A" using this expression (there is no SUMIF function, I simply combine the Sum and If functions):Sum(If([Category]="A",[Measurement],0)) THEN Sum([Value]) OVER (AllPrevious([Axis.X])) / Sum([Value]) OVER (All([Axis.X]))There is a great deal of information about OVER expressions in the Analyst manual - please refer to that for more information, e.g. starting on https://docs.tibco.com/pub/sfire-analyst/latest/doc/html/en-US/TIB_sfire-analyst_UsersGuide/index.htm#t=ncfe%2Fncfe_custom_expressions_overview.htm&rhsearch=custom%20expressions&rhhlterm=custom%20expressions&rhsyns=%20 Link to comment Share on other sites More sharing options...
Francisco Aspillaga Posted November 18, 2022 Author Share Posted November 18, 2022 Thanks Fredrik for youre helpĀ”. Link to comment Share on other sites More sharing options...
Francisco Aspillaga Posted November 21, 2022 Author Share Posted November 21, 2022 Hi Fredrik,With this formula I see the accumulated % of the total, but for example if today we are at 09/10/2022 the graph takes me that we reached 100%, and it should take me that we are at 60%.Because with this formula it could happen that if I use the values of the category "A" the expression takes me correctly, but if I take the values of the category "B" the value is always "0"?.Regards,Francisco 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