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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
AdamPolak96
Frequent Visitor

Power Query Exact match or next smaller item

Hi,

 

I searching for solution to get the same result like funticion in excel xlookup,
but i want the same result like in power pivot. 
 

AdamPolak96_0-1687954029049.png

Below function in PL

AdamPolak96_1-1687954055282.png

 

 

1 ACCEPTED SOLUTION
slorin
Super User
Super User

Hi

Add new column

try Rating_Table[GRADE]{List.PositionOf(Rating_Table[RATING SCALE],[RATING SCALE],1,(x,y)=>x>y)+1} otherwise "F"

Stéphane 

View solution in original post

2 REPLIES 2
slorin
Super User
Super User

Another possibility

try Table.SelectRows(Rating_Table, (x) => [RATING SCALE] >= x[RATING SCALE])[GRADE]{0} otherwise "F"

 

Stéphane

slorin
Super User
Super User

Hi

Add new column

try Rating_Table[GRADE]{List.PositionOf(Rating_Table[RATING SCALE],[RATING SCALE],1,(x,y)=>x>y)+1} otherwise "F"

Stéphane 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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