Forum Discussion
Filter a table using a column in another table
Hello Community ,
I have Two Table
Table 1 : with a column where there is a comment entered by a user :
| Row | Description |
| 1 | This is a invoice IV1234 |
| 2 | IV4356-for client |
| 3 | CustomerIV5678Incoiced |
Table 2 :
| Invoice ID | Amount |
| IV1234 | 1000 |
| IV4356 | 1500 |
I want to filter table1 with only the Invoice ID in table 2 ( Description Contains InvoiceID) and add a column with Invoice ID in table if possible
Does any one have a idea or a suggestion ?
Best Regards
Thank you for your help
Hi,
Please check the below picture and the attached pbix file.
It is for creating a new table.
New table = SUMMARIZE ( GENERATE ( 'Table 2', FILTER ( 'Table 1', CONTAINSSTRING ( 'Table 1'[Description], 'Table 2'[Invoice ID] ) ) ), 'Table 1'[Row], 'Table 1'[Description], 'Table 2'[Invoice ID] )
2 Replies
- Jihwan_KimSuper User
Hi,
Please check the below picture and the attached pbix file.
It is for creating a new table.
New table = SUMMARIZE ( GENERATE ( 'Table 2', FILTER ( 'Table 1', CONTAINSSTRING ( 'Table 1'[Description], 'Table 2'[Invoice ID] ) ) ), 'Table 1'[Row], 'Table 1'[Description], 'Table 2'[Invoice ID] ) - AbbasGMemorable Member
FAMH Here is my possible solution. Hope it helps you to achieve the desired result.
Step1: From Table 1 I have extracted invoice numbers by adding a custom column.
Step2: Added a prefix IV to the new extracted column.
Step3: Merged queries, so that I can see the Amount
Here is the sample pbix for your reference - https://1drv.ms/u/s!ArEx6MabNbWogQAB2CkSPnYI2F0Q?e=17ervw