Create Dynamic DAX Calculated Table

Hi,

I am wondering if there is a way to create a dynamic calculated table holding rows from two different tables, and only those rows that are being filtered or selected by the user.

The DAX Expression:
Selected_ID = UNION( SUMMARIZE(Offices, Offices[ID]),SUMMARIZE(Schools,Schools[ID]))
is not responsive to the filters placed on Offices and neither to the filters placed on Schools.

How can I create a calculated table that has only the selected rows or ID’s from both Schools and Offices?
The main reason for this is the need to show both the selected offices and the selected schools in a single Map visual. And the current maps visuals only accept a single data set. Combining the Schools table and the Offices table into a single table in the data model is no solution due to other requirements in the report.

I also attached the PBIX-file.
Question calculated table.pbix (25.7 KB)

Bumping this post for visibility

Hi @Sebastiaan - Calculated Tables are pre-executed before any report interactions. So, it is not possible to affect it based on Filters selected on report.

Thanks
Ankit J

Hi @Sebastiaan, did the response provided by @ankit help you solve your query? If not, how far did you get and what kind of help you need further? If yes, kindly mark as solution the answer that solved your query. Thanks!

Hello @Sebastiaan, just following up if the response above help you solve your inquiry?

We’ve noticed that no response has been received from you since May 27th. In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved.

Hi @Sebastiaan, due to inactivity, a response on this post has been tagged as “Solution”. If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the check box.