Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

jtovarsanchez
New Contributor II

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

evidencia1.png

Gracias¡

1 Solution

Accepted Solutions
Digvijay_Singh
Honored Contributor III

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

12 Replies
Digvijay_Singh
Honored Contributor III

Re: Add the result of an Above

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

Capture.PNG

jtovarsanchez
New Contributor II

Re: Add the result of an Above

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

vhespinog
New Contributor III

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?

Digvijay_Singh
Honored Contributor III

Re: Add the result of an Above

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

jtovarsanchez
New Contributor II

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!

buena.png

vhespinog
New Contributor III

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

jtovarsanchez
New Contributor II

Re: Add the result of an Above

does not count the times that the product rose price

Digvijay_Singh
Honored Contributor III

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

jtovarsanchez
New Contributor II

Re: Add the result of an Above

thank you very much¡

Community Browser