Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Fractile/Aggr/Sum command in load statement

I have no problem with adding the below statement to a Chart but when I try to use it in the load statement.  Here is the command I was wondering if anyone has any idea's:

median (aggr(sum({<AssetName= {"Product Name"}>}X),AcctNum))

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

You can try something like below.


Median(sum(IF(AssetName = [Product Name], X)))


Use a group by clause and group the records to the same level as you were trying with the AGGR function.


If that does not work properly. then do the SUM in the first load statement and then take the median in another load statement.


Hope that helps.


Regards,

Aadil


View solution in original post

3 Replies
Anonymous
Not applicable
Author

Use an IF statement instead of using set analysis. Set analysis will not work on load scripts.

Not applicable
Author

So what would it look like.  Can you provide me an example.

Anonymous
Not applicable
Author

You can try something like below.


Median(sum(IF(AssetName = [Product Name], X)))


Use a group by clause and group the records to the same level as you were trying with the AGGR function.


If that does not work properly. then do the SUM in the first load statement and then take the median in another load statement.


Hope that helps.


Regards,

Aadil