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.
Hi
I want to exclude a specific value after CROSSJOIN two tables.
See example below.
How can I do it?
1. Table A
Type |
A |
B |
C |
2. Table B
Number |
1 |
2 |
3 |
3. Cross join
Type | Number |
A | 1 |
A | 2 |
A | 3 |
B | 1 |
B | 2 |
B | 3 |
C | 1 |
C | 2 |
C | 3 |
4. I want to exclude "3" from type "A" and
Type | Number |
A | 1 |
A | 2 |
B | 1 |
B | 2 |
B | 3 |
C | 1 |
C | 2 |
C | 3 |
Solved! Go to Solution.
Hi,
Thank you for your message, and please try something like below.
|| function might help.
New table =
FILTER (
GENERATE ( 'Table A', 'Table B' ),
NOT ( 'Table A'[Type] = "A"
&& ( 'Table B'[Number] = 3
|| 'Table B'[Number] = 4
|| 'Table B'[Number] = 5
|| 'Table B'[Number] = 6 ) )
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
New table =
FILTER (
GENERATE ( 'Table A', 'Table B' ),
NOT ( 'Table A'[Type] = "A"
&& 'Table B'[Number] = 3 )
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Thank you.
How do I get rid of both 2 and 3 from type A?
Hi,
Thank you for your feedback, and please check the attached file down below.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Thank you. really helpful
sorry but i have one more question
The OR function can only filter two things.
How can I filter more than 3?
For example, what if i need to remove 1,2,3 out of 1, 2, 3, 4 of type A?
Hi,
Thank you for your message, and please try something like below.
|| function might help.
New table =
FILTER (
GENERATE ( 'Table A', 'Table B' ),
NOT ( 'Table A'[Type] = "A"
&& ( 'Table B'[Number] = 3
|| 'Table B'[Number] = 4
|| 'Table B'[Number] = 5
|| 'Table B'[Number] = 6 ) )
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
26 | |
21 | |
16 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |