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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.