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
vadim_g
Frequent Visitor

insert specific rows from a table into a second table with condition

Hello,

 

I have 2 excel file : one which detail of each piece, and one which detail each machine.

vadim_g_0-1656499296004.pngand vadim_g_1-1656499334929.png

 

I want to copy on first excel, the rows of the second excel only if the rows is "ok" and only specific rows. The specific rows of the second excel is choosed like that : the value of the piece must be contained in the value of the begin and the end piece. Sorry for my english, better with the result that i want :

vadim_g_2-1656499642520.png

 

Thanks a lot

 

 

 

1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @vadim_g ,

 

Please check the formulas:

operator = IF(Table1[ok/nok] = "ok",CALCULATE(MAX(Table2[operator]),FILTER(Table2,Table1[piece]>=Table2[begin piece]&&Table1[piece]<=Table2[end piece])))

machine = IF(Table1[ok/nok] = "ok",CALCULATE(MAX(Table2[machine]),FILTER(Table2,Table1[piece]>=Table2[begin piece]&&Table1[piece]<=Table2[end piece])))

 

vjaywmsft_0-1656924163377.png

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

1 REPLY 1
v-jayw-msft
Community Support
Community Support

Hi @vadim_g ,

 

Please check the formulas:

operator = IF(Table1[ok/nok] = "ok",CALCULATE(MAX(Table2[operator]),FILTER(Table2,Table1[piece]>=Table2[begin piece]&&Table1[piece]<=Table2[end piece])))

machine = IF(Table1[ok/nok] = "ok",CALCULATE(MAX(Table2[machine]),FILTER(Table2,Table1[piece]>=Table2[begin piece]&&Table1[piece]<=Table2[end piece])))

 

vjaywmsft_0-1656924163377.png

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

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.