Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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 | ||
| row | ID | amount |
| 1 | 1001 | 10 |
| 2 | 1002 | 10 |
| Table 2 | ||
| row | ID | amount |
| 1 | 1003 | 12 |
| 2 | 1004 | 15 |
| Table 3 | ||
| row | ID | amount |
| 1 | 1001 | 10 |
| 2 | 1002 | 10 |
| 3 | 1003 | 12 |
| 4 | 1004 | 15 |
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!
Solved! Go to Solution.
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
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
Final output
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
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
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
Final output
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
"when I filter 1 row from table 1" - where are you doing this?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 68 | |
| 67 | |
| 33 | |
| 31 | |
| 29 |