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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
iamprajot
Responsive Resident
Responsive Resident

How to get First, Second, Third Max Prices from another Table?

How to get First, Second, Third Max Prices from another Table?

1 ACCEPTED SOLUTION
ausrine
Frequent Visitor

2 REPLIES 2
ausrine
Frequent Visitor

@iamprajot

I believe RANKX() would be suitable here!

https://msdn.microsoft.com/en-us/library/gg492185.aspx

iamprajot
Responsive Resident
Responsive Resident

I have data similar to table A for Product & Prices (each product have 4 or 5 Prices) like

Product       Price

Tea       25

Tea       30

Sugar       15

Sugar       55

Tea       20

 

and

table B for Product and other data

Tea       XYZ

Sugar       XYZ

 

Now what I want is something like below and I have researched a lot and couldn't find a proper solution to that.

Product       Price 1       Price 2       Price 3

Tea       30       25       20

Sugar       55       15       -

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors