12 Replies Latest reply: May 24, 2017 5:31 PM by Jessica tovar

# Add the result of an Above

Good morning I would like to know how I can add the following expression:

My Expression is the Status =

If (Status = 'Subium', 1,0)

But now I need Total Subio to tell me how many rose in this case should give me 2, but it is not doing, someone could help me the way I calculate that expression is the following:

Sum

Evidence1.png

Thank you

Gracias¡

• ###### Re: Add the result of an Above

Check this, whether you want to accumulate count or total count in a column -

• ###### Re: Add the result of an Above

I do not understand where you get the ID or the Total

• ###### Re: Add the result of an Above

"TOTAL is a useful qualifier that can be added to an aggregation function (such as Sum, Count, and Avg) to tell QlikView to ignore the dimensions of a chart in the calculation. By default, it ignores all the dimensions, but we can be more specific and tell it to ignore some while respecting others".

QlikView for Developers Cookbook

see an example here

What does the TOTAL qualifier do?

• ###### Re: Add the result of an Above

Can you elaborate more on your requirement, the expressions can be modified to meet your need.

• ###### Re: Add the result of an Above

I did the following

Status = =Aggr(if(Above(Precio)>Precio,'Bajo', if(Above(Precio)<Precio,'Subio','Sin Cambios')),CCO_CompraANombre,Precio)

Subio=if(Status='Subio',1,0) and in the properties I put it of type number.

Total Subio= Count(Total if(Subio='Subio',Precio))

But it still does not bring me how many ... helped!

• ###### Re: Add the result of an Above

May be like this

sum(total Aggr(if(Above(Precio)<Precio,1),CCO_CompraANombre,Precio))

i'm not sure if i understand the issue

• ###### Re: Add the result of an Above

does not count the times that the product rose price

• ###### Re: Add the result of an Above

May be Try this, I calculated based on dimension 'Status' but in your case Status is expression so try putting actual expression of Subio in the total calculation -

Total Subio=

Count(Total if(

Aggr(if(Above(Precio)>Precio,'Bajo', if(Above(Precio)<Precio,'Subio','Sin Cambios')),CCO_CompraANombre,Precio)=

'Subio',Precio))

I am just trying to put actual expression of Subio calculation in the total expression

• ###### Re: Add the result of an Above

thank you very much¡

• ###### Re: Add the result of an Above

Guys I have another doubt I passed my total price that went up to a general table where I qualify my suppliers and the expression I add the CC_MES but now it does not filter anything at all.

Count(Total if(

Aggr(if(Above(Precio)>Precio,'Bajo', if(Above(Precio)<Precio,'Subio','Sin Cambios')),CCO_CompraANombre,Precio,CC_Mes,SC_Almacén)

='Subio',Precio))

• ###### Re: Add the result of an Above

I don't see column 'Precio' here? The formula is using it, may be image is not showing it, not sure..

• ###### Re: Add the result of an Above

You were right I lacked the price sorry¡