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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
JustinDoh1
Post Prodigy
Post Prodigy

Need some clarifications with TOPN & how to add more criteria

I have bottom DAX that illustrates TOPN:

JustinDoh1_0-1757979497760.png

My understanding with TOPN is that it returns the top row.

So, for this case, because we have same value for "MaxTotalWHSS", it would return 5 rows, instead of 1 row, correct?

 

How do I add more criteria so that it would be something like:

tblSurvey[MaxTotalWHSS] ASC and tblSurvey[ProcessingDate] ASC ? 

 

Thanks.

 

1 ACCEPTED SOLUTION

Hi @JustinDoh1 ,

you can try below snippet.

Praful_Potphode_0-1758001890310.png

Table 2 = TOPN(1,
FILTER(
    ALL('Table'),
    'Table'[StartCutOff]>=0
),
'Table'[MaxTotalWHSS],ASC,'Table'[ProcessingDate],ASC)

View solution in original post

2 REPLIES 2

Hi @JustinDoh1 ,

you can try below snippet.

Praful_Potphode_0-1758001890310.png

Table 2 = TOPN(1,
FILTER(
    ALL('Table'),
    'Table'[StartCutOff]>=0
),
'Table'[MaxTotalWHSS],ASC,'Table'[ProcessingDate],ASC)
lbendlin
Super User
Super User

You can specify multiple sort criteria for TOPN. TOPN function (DAX) - DAX | Microsoft Learn

 

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.