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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
CEllis
Resolver I
Resolver I

Exclude Top

Hi,

 

Is it posible to exclude the TopN figures.

 

I want to be able to filter out all values but the TopN ones.


To be able to do thisd but backwards

 

 

"EBACC A8",                       
    CALCULATE (
    SUM ( Assessment[Points] ),FILTER(Assessment,Assessment[Bucket]="EBACC"),
        TOPN (
               3,
        GROUPBY ( Assessment, Assessment[UPN (Pupil)], Assessment[YearGroup], Assessment[Collection], Assessment[Bucket] ),CALCULATE ( SUM ( Assessment[Points] ) ))))

 

 

 Any help greatly appreciated.

1 ACCEPTED SOLUTION

I ended up with this tutorial in then https://www.youtube.com/watch?v=WJ0p638zpwA

 

Worked well

 

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Share some data, explain the question and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@CEllis , You can try window function there we can give start offset

 

example measures

 

M1= SUM ( Assessment[Points] )

 

Top 1000 exclding Top 3 =

CALCULATE([M1], WINDOW(4,ABS, 1000, ABS, ADDCOLUMNS(ALLSELECTED( Assessment[UPN (Pupil)], Assessment[YearGroup], Assessment[Collection], Assessment[Bucket] ),ORDERBY([M1],desc))))

 

Dynamic TOPN using TOPN/Window and Numeric parameter: https://youtu.be/vm2mdEioQPQ

 

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

I nearly get it
I've added a measure 'Total Points' to only look at the "English" Bucket.

I then added a column to the table below called [__English A8]

 

Total Points = CALCULATE(SUM(Assessment[Points]),FILTER(Assessment,Assessment[Bucket]="English")  
)

__English A8 = CALCULATE([Total Points],KEEPFILTERS(WINDOW(1,ABS,1,ABS,SUMMARIZE(Assessment,Assessment[UPN (Pupil)],Assessment[YearGroup],Assessment[Collection],Assessment[Bucket]), ORDERBY(Assessment[Total Points],DESC))))

 

 

What I was hoping for is the [__English A8] column would only show the first value because its the highest not show both values, by adding the 1,ABS,1 I thought that would restrict it to the first record.

 

CEllis_0-1701167654263.png

Many thanks for your help.

 

 

I ended up with this tutorial in then https://www.youtube.com/watch?v=WJ0p638zpwA

 

Worked well

 

Helpful resources

Announcements
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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.