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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

largets 4 with multiple same values

Hi All!

I am currently trying to do a sum of the four largets points in a column. My problem is, that I have multiple rows with the same amount of values, and i do only want to sum the top four rows, not the top four values. In the below I would like to get a sum of 125 and not 173.

 

I have also assed, that I cannot create a new table with distinct, as the first four rows in principle could be the same number. 

 

Can you help with this problem?

 

poulsea_0-1676930968972.png

 

2 REPLIES 2
Anonymous
Not applicable

Hi, Mahyartf
The measure does not quit work, as in the below scenario it return 119 insted of 120 which is the correct number: 

 

poulsea_0-1676967695985.png

 

MahyarTF
Memorable Member
Memorable Member

Hi,

Please use below measure for distinct top N rows sum :

SumTopN =
CALCULATE( sumx(TOPN(4, VALUES(Sheet119[Number]), Sheet119[Number],DESC), Sheet119[Number]))
MahyarTF_0-1676936603509.png

 

Appritiate your Kudos and please mark it as a solution if it helps you .

Mahyartf

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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