Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

fabianaiglesias
Contributor

StructuredParameter´s Aggr function bug?

Hi,

recently, I copy an expression from a post and I think there´s a bug.

The expression is:

=Aggr(

    If(Rangesum(Above(Sum({1} Sales)/Sum({1} total Sales),1,RowNo()))<0.8, 'A',

        If(Rangesum(Above(Sum({1} Sales)/Sum({1} total Sales),1,RowNo()))<0.9, 'B',

            'C')),

    (Product,(=Sum({1} Sales),Desc))

    )

The post is: Recipe for a Pareto Analysis – Revisited

When I copy the expression, the structure parameter is no detected in my Qlik (I use Qlik Sense Desktop, february 2018 version)

As it´s showed in the figure, "desc" is not in blue and it does no works.

Do you think it´s a bug or am I doing something wrong?

10 Replies
jwjackso
Contributor III

Re: StructuredParameter´s Aggr function bug?

I believe the sort parameter is case sensitive and should be Desc.

OmarBenSalem
Esteemed Contributor

Re: StructuredParameter´s Aggr function bug?

I've always worked in qlik sense with key words, numeric, ascend and descend;

I mean sthing like:

aggr(rangesum(above(sum(sales),0,rowno())),(Year(numeric,ascend)))

both key words, will show black (as if sense is not considering them), but they do work !

try to add numeric with it (it'll also be black...)

OmarBenSalem
Esteemed Contributor

Re: StructuredParameter´s Aggr function bug?

nope; it'll always be black no matter what..

fabianaiglesias
Contributor

Re: StructuredParameter´s Aggr function bug?

I´ve tried writting "Desc" and Descendent with the same result

jwjackso
Contributor III

Re: StructuredParameter´s Aggr function bug?

Your formula is missing a comma after the first 'A' and a close parenthesis after the last Dinero.  See below:

=Aggr(

If(Rangesum(Above(Sum({1} Dinero)/Sum({1} total Dinero),1,RowNo()))<0.8,'A'

     If(Rangesum(Above(Sum({1} Dinero)/Sum({1} total Dinero),1,RowNo()))<0.5,'B',

         'C')),

            (Descripcion,(=Sum({1} Dinero,desc))

            )

           

=Aggr(    

     If(Rangesum(Above(Sum({1} Sales)/Sum({1} total Sales),1,RowNo()))<0.8, 'A',

  If(Rangesum(Above(Sum({1} Sales)/Sum({1} total Sales),1,RowNo()))<0.9, 'B',

        'C')),

       (Product,(=Sum({1} Sales),Desc))   

       )

Re: StructuredParameter´s Aggr function bug?

I don't see why it should not work... I agree that syntax editor isn't the best in detecting this new syntax, but like Omar mentioned it should still work. Would you be able to share a sample where this isn't working? Also, when you say when it isn't working, does the expression show no value in the chart? or does it show unexpected value?

fabianaiglesias
Contributor

Re: StructuredParameter´s Aggr function bug?

I´m attaching the qvf file.

The data is not sorted properly using the mentioned expression. That is why I thaugt that the "desc" instruction is not working.

fabianaiglesias
Contributor

Re: StructuredParameter´s Aggr function bug?

Thaks Jerry, I think it was a paste mistake, because my qvf was right!

pablolabbe
Valued Contributor II

Re: StructuredParameter´s Aggr function bug?

When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others

Community Browser