Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
jessica_webb
Creator III
Creator III

Aggregated expression

I have a very large table with the following 3 dimensions 

and 6 expressions:

      

IDTypeSetSUM({<GEN={'ALL'}>}NUM)AGGR(NODISTINCT SUM({<GEN={'ALL'}>} IDAGGR(NODISTINCT SUM({<GEN={'ALL'}>} NUM),Type_Set)SUM(TOTAL {<GEN={'ALL'}>} NUM)SUM({<GEN={'ALL'}>}NUM)/AGGR(NODISTINCT SUM({<GEN={'ALL'}>} NUM),ID)AVG(SUM({<GEN={'ALL'}>}NUM)/AGGR(NODISTINCT SUM({<GEN={'ALL'}>} NUM),ID))
123ANAERG3317944107355445530.01840.019246154
123ABZFAW57179418084155445530.03180.019246154
123AAQEGA64179415278255445530.03570.019246154
123AHSSMFM1517942776655445530.00840.019246154
387AAEGGV10172970755445530.00580.019246154
387AASDFBT1217293653755445530.00690.019246154
387AMGFMNS10117298245855445530.05840.019246154
387ANEATN3317296924155445530.01910.019246154
914AMGFMNS3017518245855445530.01710.019246154
914AAETWAQ35175113909655445530.020.019246154
914ADTUKDTUJ2017519943155445530.01140.019246154
914ASTJN15175115164755445530.00860.019246154
914AAWEGG151751752755445530.00860.019246154

My problem is with the final expression. I have displayed in the table the value I would like to see (which is an average of all the values in the 5th column), but the expression doesn't work as it currently is.

Hope this is explained clearly - help would be much appreciated!

1 Solution

Accepted Solutions
sunny_talwar

May be try this

Avg(TOTAL Aggr(Sum({<GEN={'ALL'}>}NUM)/Sum(TOTAL <ID> {<GEN={'ALL'}>} NUM), ID, Type, Set))

View solution in original post

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Kindly Share your application.

Regards,

Kaushik Solanki

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

May be try this

Avg(TOTAL Aggr(Sum({<GEN={'ALL'}>}NUM)/Sum(TOTAL <ID> {<GEN={'ALL'}>} NUM), ID, Type, Set))

jessica_webb
Creator III
Creator III
Author

Thank you Sunny!

Another quick,simple solution

Much appreciated,

Jess