Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggr(f(x),x) and x must be in order

Actually I've got problem when I try to calculate a sum f(x) with the variable x. My result is always wrong because aggr() return the default value of x instead of the value of x in order.

If any of you have any idea about how can I make the x in order.

Thanks so much for your reponse!!

5 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     I couldnt understand your problem.

     Kindly explain with some example.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
er_mohit
Master II
Master II

in sort tab the field x you check on load order original uncheck others

swuehl
MVP
MVP

Unfortunately, you cannot set the sort order of an advanced aggregation dimension field from within the front end.

QV always uses the load order of the field, AFAIK.

The only solution to this is to set the load order accordingly (e.g. by loading an inline temporary table with only this field first in your script, which you could possible drop at the end).

Not applicable
Author

Hi

For exemple, x is a field of DATE, and f(x) or f(DATE) is an expression calculating the

     rangesum(above(count(DATE),0,RowNo())).

To get the right result, the field of DATE must be in the right order.

and then the aggregation can work for a linest_m, for exemple, something like linest_m (aggr(f(DATE),DATE),DATE).

Thanks and

Regards,

Not applicable
Author

Thank you for your response:)

Actually I have tried the load function, and in the table view the data are in order. But when it come to the aggr() function, the result is neither correct and the same problem remains.