Forum Discussion

Diptarup's avatar
Diptarup
Helper II
2 years ago
Solved

Getting Sum except TOP 10 rank

I have table, wherein I need to calculate the value of all products which are ranked in Top 10 .

Table below :- 

So the value I am looking for is 38.46.

I have used a meaure to calculate the rank, which is given below:-

Top10 =
Var VendorRank = RANKX(ALL(Table1[Products]),[Amount (Recal)],,DESC)
Return
IF(VendorRank>10,[Amount (Recal)],BLANK())
What is happening, is that I am getting the Overall value of 41.61 and not 38.46. Any help is highly appreciated. 

Table 1

ProductsValue
A15.00
B10.96
C2.82
D2.45
E1.55
F1.50
G1.40
H1.36
I0.72
J0.70
K0.60
L0.44
M0.43
N0.39
O0.36
P0.36
Q0.29
R0.29

 

  • Hi Diptarup 
    You can use :

    SumTOPN =
    CALCULATE ( [sum_], TOPN ( 10, 'Table', 'Table'[Value] ))

    pbix is attached

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

1 Reply

  • Hi Diptarup 
    You can use :

    SumTOPN =
    CALCULATE ( [sum_], TOPN ( 10, 'Table', 'Table'[Value] ))

    pbix is attached

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly