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
MrLanla
New Member

input data range condition with another table

hi , i want to make "new column" in power bi Desktop with related to another table with range condition 

 

first i have releatioship them and what next?

for example

i have two table

1. 1111.png

 

 

 

 

and 2. 

222.png

 

 

and this is the result i want ( in Table1)

444.jpg

 

 

what can i do with "new column"?  thank you 😀😉😥

 

 

 

 

 

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@MrLanla 

you can try this

Grade = 

VAR _order=MINX(FILTER(Gradegroup,Gradegroup[Order]>'Table'[order]),Gradegroup[Order])
return maxx(FILTER('Gradegroup',Gradegroup[Order]=_order),Gradegroup[Grade])

1.PNG

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
ryan_mayu
Super User
Super User

@MrLanla 

you can try this

Grade = 

VAR _order=MINX(FILTER(Gradegroup,Gradegroup[Order]>'Table'[order]),Gradegroup[Order])
return maxx(FILTER('Gradegroup',Gradegroup[Order]=_order),Gradegroup[Grade])

1.PNG

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Grade = VAR _order=MINX(FILTER(Gradegroup,Gradegroup[Order]>'Table1'[Order Quantity]),Gradegroup[Order])
return maxx(FILTER('Gradegroup',Gradegroup[Order]=_order),Gradegroup[Grade])
 
Wow! 😮 this is work! i never use Variable in DAX before.
i will try to understand, thanks for help.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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