Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
adamdavi3s
Master
Master

cost distribution using aggr

Hi All,

Trying to create a cost distribution but aggregating the data.

I've attached my workings but I can't quite figure out the formula to use.

Note that in this file I have done a resident load to show you what I am trying to achieve but in reality this isn't feasible, it needs to work from formula on the raw data somehow.

I just can not sus it out

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try to aggregate your cost in the advanced aggregation and perform a distinct count in the expression:

=aggr( round(sum([TOTAL COST])/500)*500 ,CUSTOMER) =count(DISTINCT CUSTOMER) / count(DISTINCT total CUSTOMER)
100%
027%
50036%
150027%
20009%

View solution in original post

2 Replies
swuehl
MVP
MVP

Try to aggregate your cost in the advanced aggregation and perform a distinct count in the expression:

=aggr( round(sum([TOTAL COST])/500)*500 ,CUSTOMER) =count(DISTINCT CUSTOMER) / count(DISTINCT total CUSTOMER)
100%
027%
50036%
150027%
20009%
adamdavi3s
Master
Master
Author

I got so close to that yesterday! Not sure why I couldn't figure that one out,  thank you swuehl