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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I Sum a Value for Another Distict Value?

How do I sum the total leg empty miles for distinct leg values? The answer should be 292 for this dataset. I tried this but it is only counting.

sum(aggr(count(distinct([TMW leg#])),TotalLegEmptyMiles))

TMW leg#

TotalLegEmptyMiles

263226

0

260442

93

260442

93

260442

93

260377

0

260294

0

260293

25

260278

0

260264

20

260263

73

260262

31

260261

25

260260

17

260257

8

292

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

Are you looking for

sum(aggr( Only(TotalLegEmptyMiles), [TMW leg#] ))


?



View solution in original post

2 Replies
swuehl
Champion III
Champion III

Are you looking for

sum(aggr( Only(TotalLegEmptyMiles), [TMW leg#] ))


?



Not applicable
Author

Thank you SO much!!!!