Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Specialist III
Specialist III

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

OmarBenSalem

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

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

Anonymous
Not applicable
Author

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

jwjackso
Specialist III
Specialist III

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))   

       )

sunny_talwar

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?

Anonymous
Not applicable
Author

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.

Anonymous
Not applicable
Author

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

pablolabbe
Luminary Alumni
Luminary Alumni

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