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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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