Jump to content

Formul sumif


Francisco Aspillaga
Go to solution Solved by Fredrik Rosell,

Recommended Posts

  • Solution

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

example.thumb.PNG.cc082ff3a999f150c524b5c1d33e3ad7.PNG

Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...