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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Praful_Potphode
Solution Sage
Solution Sage

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
Praful_Potphode
Solution Sage
Solution Sage

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.