Forum Discussion
Filter values base on column from other Query
| Query 1 | Query 2 | ||
| 79 | 80 | ||
| 48 | 40 | ||
| 80 | 79 | ||
| 40 | 98 | ||
| 40 | 45 | ||
| 98 | 63 | ||
| 31 | |||
| null | |||
| null | |||
| 48 | |||
| 63 | |||
| 45 | |||
| 35 |
I have two Querys, where Query 1 have extra values, and i would like to keep the "null" and the numbers from Query 2 at the sametime. The same number from Query 2 may appear more than once in Query 1, i will also need to keep all of that too.
Please help, thanks
Hi Yqy
To achieve your goal you can (in PQ ).
Duplicate your table twice:
1. For Q1 - nulls :2. For Q2 no nulls
Then you merge inner Join Q2 no nulls with your original table:
After expanding, filtering out nulls from the new column, and deleting it:
And last union is with a null copy:
them turn off the option of loading to the model those "help" tables:
Result:
Sample file here:Link to pbix
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
1 Reply
- Ritaf1983Super User
Hi Yqy
To achieve your goal you can (in PQ ).
Duplicate your table twice:
1. For Q1 - nulls :2. For Q2 no nulls
Then you merge inner Join Q2 no nulls with your original table:
After expanding, filtering out nulls from the new column, and deleting it:
And last union is with a null copy:
them turn off the option of loading to the model those "help" tables:
Result:
Sample file here:Link to pbix
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly