Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Diptarup
Helper II
Helper II

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

 

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @Diptarup 
You can use :

SumTOPN =
CALCULATE ( [sum_], TOPN ( 10, 'Table', 'Table'[Value] ))
Ritaf1983_0-1714035546151.png

pbix is attached

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

View solution in original post

1 REPLY 1
Ritaf1983
Super User
Super User

Hi @Diptarup 
You can use :

SumTOPN =
CALCULATE ( [sum_], TOPN ( 10, 'Table', 'Table'[Value] ))
Ritaf1983_0-1714035546151.png

pbix is attached

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.