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 guys,
I'm trying to join two tables with the same columns. I want to use the new table to show the datas from the two initial tables but i want to apply a filter on one of the column of one of the two tables.
My problem is that the UNION table is not affected by the filter on the initial table.
Can I solve that ?
Solved! Go to Solution.
Hey @Anonymous,
I'm not completely sure what you're trying to do, but I'm rifht and you have everything else down and still want to differentiate after the UNION, it's easy:
Create a column in both before the UNION, with the same name, and just fill that column with tablename or 1 & 0 or anything that after the union will have two values. (Like [TableName] = "xyz" in the first, and [TableName] = "abc" in the second)
Afterwards, when filtering, you could just always apply an extra clause with the [TableName] value.
🙂
Hey @Anonymous,
I'm not completely sure what you're trying to do, but I'm rifht and you have everything else down and still want to differentiate after the UNION, it's easy:
Create a column in both before the UNION, with the same name, and just fill that column with tablename or 1 & 0 or anything that after the union will have two values. (Like [TableName] = "xyz" in the first, and [TableName] = "abc" in the second)
Afterwards, when filtering, you could just always apply an extra clause with the [TableName] value.
🙂
I'll try to be more clear 🙂
My UNION is made on two tables, both contains text news :
The result of the UNION is one table. On one column there is either the "National" value, either a city name.
On my report i have a filter that filters the local news table with the city name so I wanted the UNION table to display the national news and the local news based on the city name selected on my filter, but the filter doesnt seem to filter the result table even if it's filtering the source table...
Hi,
Did you ever get a solution to this please?
I'm trying to do exactly the same thing you describe and I'm facing the same issue.
Thanks.
Hi @Anonymous
Do you mean you created a calculated table using the UNION function?
Once a calculated table is created, it has no lineage to any existing tables in the model, and you would need to create a relationship with the table where you are appling filters for those filters to have any effect.
If the UNION function is being used as part of a measure however, lineage is retained where possible for each column separately, so filters could still have effect during the evaluation of the measure.
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 |
---|---|
106 | |
98 | |
80 | |
67 | |
63 |
User | Count |
---|---|
145 | |
111 | |
104 | |
84 | |
64 |