Forum Discussion
Anonymous
9 years agoNot applicable
Sum of TOPN Columns
Hey everyone, How do i SUM only the Top 10 values of a table? I tried this: Total SUM TOPN = CALCULATE([Total SUM], FILTER(Table, RANKX(ALL(Table[Name]), [Total SUM],,DESC) <= 10)) but it d...
- 9 years ago
Anonymous
You need to group the categories to applied the aggregation.
One way is this:
Top2RL = CALCULATE ( SUM ( Table3[Value] ), TOPN ( 3, GROUPBY ( Table3, Table3[Category] ), CALCULATE ( SUM ( Table3[Value] ) ) ) ) - 9 years ago
Hi Anonymous,
Great to hear the problem got resolved.:smileyhappy: Could you accept the corresponding reply as solution to help others who has similar issue easily find the answer and close this thread?
Regards
Vvelarde
Community Champion
9 years agoAnonymous
You need to group the categories to applied the aggregation.
One way is this:
Top2RL =
CALCULATE (
SUM ( Table3[Value] ),
TOPN (
3,
GROUPBY ( Table3, Table3[Category] ),
CALCULATE ( SUM ( Table3[Value] ) )
)
)Anonymous
9 years agoNot applicable
THANKS Vvelarde!!! I've been trying to figure this out whole day :D
- v-ljerr-msft9 years ago
Microsoft Employee
Hi Anonymous,
Great to hear the problem got resolved.:smileyhappy: Could you accept the corresponding reply as solution to help others who has similar issue easily find the answer and close this thread?
Regards