Forum Discussion
Inner join with condition
- Anonymous1 year ago
Hi Vidhyashree153 ,
You can try this way:
Here is my sample data:Use this M code to create a Blank Query:
let FindDefectnumber = (MonthStart as date, MonthEnd as date) => let FilteredRows = Table.SelectRows(Sheet1, each [CreateDate] >= MonthStart and [CreateDate] <= MonthEnd), DefectnumberCol = Table.Column(FilteredRows, "Defectnumber") in DefectnumberCol in FindDefectnumberThen back to Sheet2 and create a Invoke Custom Function:
Expand columns:Output:
Then you can inner join Sheet1 and Sheet2 with column Defectnumber and Related Number:Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Vidhyashree153 ,
You can try this way:
Here is my sample data:
Use this M code to create a Blank Query:
let
FindDefectnumber = (MonthStart as date, MonthEnd as date) =>
let
FilteredRows = Table.SelectRows(Sheet1, each [CreateDate] >= MonthStart and [CreateDate] <= MonthEnd),
DefectnumberCol = Table.Column(FilteredRows, "Defectnumber")
in
DefectnumberCol
in
FindDefectnumber
Then back to Sheet2 and create a Invoke Custom Function:
Expand columns:
Output:
Then you can inner join Sheet1 and Sheet2 with column Defectnumber and Related Number:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.