Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 219300

Select topn of one column and sum corresponding values from another column

$
0
0

Hi,

 

What I would like is to write a calculated measure that sums the Points, for the N highest Iterations. 

 

 Iteration           Points

113                   1

112                   49

111                   10

110                   52

109                   44

 

This data will be updated regularly, and I only want to see the summation of the most recent iterations, without having to select the iterations in a slicer (for example, N=3, I would only want to see the summation of the Points of Iteration 113, 112, 111 = 1 + 49 + 10 = 60, and next week it would automatically sum the points for Iterations 114, 113, 112)

 

When I try to use TopN, it's not giving me what the right number. 

SumTop3 = CALCULATE(SUM(velocity[points]), TOPN(3, velocity, velocity[iteration]))

 

Any help would be appreciated.

 

Thanks in advance,

 


Viewing all articles
Browse latest Browse all 219300

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>