Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Not filtering correct in UNION

Hello all, 
Maybe this is an easy take, but I'm facing some issues. I have 2 tables that together form the third table with the UNION function in DAX. Take a look at tables below:

 Table 1 
rowIDamount
1100110
2100210
   
 Table 2 
rowIDamount
1100312
2100415
   
   
   
 Table 3 
rowIDamount
1100110
2100210
3100312
4100415

 

However, I want the user to be able to first set filters for table 1, then for table 2, and the outcome of both tables should be displayed in table 3. But now, when I filter 1 row from table 1, table 3 also only shows that row. But when I also select a row in table 2, table 3 turns empty. 
Is the UNION function the correct one for this? Or is this a relational issue? Would be thankful for the help!

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,
If you want to use two filters to display the filtered results on a single table, you first need to make sure that there is no relationship between these two tables

vheqmsft_0-1729479642659.png

Create a measure

Is Fittered = 
IF(
    SELECTEDVALUE('Table 3'[Row]) IN VALUES('Table 1'[Row]) || SELECTEDVALUE('Table 3'[Row]) IN VALUES('Table 2'[row]),
    1,
    0
)

Apply the measure to the Table 3

vheqmsft_1-1729479698289.png

Final output

vheqmsft_2-1729479713899.png

 

Best regards,
Albert He


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,
If you want to use two filters to display the filtered results on a single table, you first need to make sure that there is no relationship between these two tables

vheqmsft_0-1729479642659.png

Create a measure

Is Fittered = 
IF(
    SELECTEDVALUE('Table 3'[Row]) IN VALUES('Table 1'[Row]) || SELECTEDVALUE('Table 3'[Row]) IN VALUES('Table 2'[row]),
    1,
    0
)

Apply the measure to the Table 3

vheqmsft_1-1729479698289.png

Final output

vheqmsft_2-1729479713899.png

 

Best regards,
Albert He


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

HotChilli
Super User
Super User

"when I filter 1 row from table 1" - where are you doing this?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.