Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
n1ef5ng1
Creator
Creator

Aggr function on Valuelist

Is it possible to do that? I need an aggr function for every valuelist that i mentioned.

The value that I get on a new pivot table and another pivot table with valuelist differ

(sum(Moves)/sum(Total Moves)) * avg(Rate)

why is this so

9 Replies
n1ef5ng1
Creator
Creator
Author

aggr function

vaggr((sum(Moves)/ sum(total Moves)) * sum(Rate),Name))

Why it is not working when it comes with valuelist

er_mohit
Master II
Master II

aggr(((sum(Moves)/ sum(total Moves)) * sum(Rate)),Name)

n1ef5ng1
Creator
Creator
Author

if(ValueList(~~~)= ~~~,

aggr(((sum(Crane)/ sum(total Crane)) * sum(Rate)),Name)

is not working

er_mohit
Master II
Master II

are you tried to use aggr before if??

try to use that aggr before if

aggr(if(----- then codition ),Name)

n1ef5ng1
Creator
Creator
Author

will be using, but till now. the coding I have has only one aggr

kuba_michalik
Partner - Specialist
Partner - Specialist

Hard to say without knowing what dimensions the pivot chart has, and the exact expression you are using.

But one possible thing is that if the chart does not have [Name] as dimension, then aggr returns mutiple values for each cell and that can't be displayed. You'd have to somehow conver what aggr returns to a single value (with an external aggregation function).

Not applicable

hi

try this it working fine,

and see attachement.

test:

LOAD * INLINE [

    Name, Rate, Moves

    a, 5, 200

    b, 10, 300

    c, 5, 400

    d, 15, 500

    e, 20, 200

    f, 5, 300

    g, 15, 100

];

take Dimension is Name

expression = >   aggr((sum(Moves)/ sum(total Moves)) * sum(Rate),Name)

n1ef5ng1
Creator
Creator
Author

Thanks for the effort,

however, each of my A B C D E F on your example.... is different formula from different table..

therefore i doubt i can use this method...

marcus_sommer

Generally complexe aggregations on synthetic dimensions like valuelist(), class() ... does not work.

- Marcus