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
SamanAteeq
Employee
Employee

Power Query List.MaxN

= Table.SelectRows(#"Sorted Rows", each [FYear] = List.MaxN(#"Sorted Rows"[FYear],5)) not filtering the Top N rows, though List.Max function is working perfectly

 

can someone help me?

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@SamanAteeq 

Try it this way:

Table.SelectRows(#"Sorted Rows", (x)=> List.ContainsAny( List.MaxN(#"Sorted Rows"[FYear],5), {x[FYear]} ))
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

1 REPLY 1
Fowmy
Super User
Super User

@SamanAteeq 

Try it this way:

Table.SelectRows(#"Sorted Rows", (x)=> List.ContainsAny( List.MaxN(#"Sorted Rows"[FYear],5), {x[FYear]} ))
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

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.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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