Forum Discussion

mikebeccaria's avatar
mikebeccaria
Frequent Visitor
3 years ago

Using Table Selected Value Filter in Another Table

I am attempting to do something I believe should be simple - but can't figure it out. I want to filter visual Table B from a record selected in Table A, but only filter Table B using a subset of columns from Table A. Columns from both tables are based on the same table. I trying to create a calculated table to show the results of Table B.

 

--Calculated Table B

Table B =
--select the event_name value from a column in Table A
VAR selected_event_name = SELECTEDVALUE('event_expanded_view'[event_name])
--Return a table with ALL event_name, event_date from 'event_expanded_view', filter only using the selected value "event_name" from visual table A - no other filters from Table A
RETURN
CALCULATETABLE(
    SUMMARIZE(
        'event_expanded_view'
        ,event_expanded_view[event_name]
        ,event_expanded_view[actual_date]
    )
    ,FILTER('event_expanded_view', event_expanded_view[event_name] = selected_event_name
    )
)
 
I'm getting a blank result set. How can I get a table B of all event names and dates from 1 selected visual table A?

2 Replies

    • mikebeccaria's avatar
      mikebeccaria
      Frequent Visitor

      Thanks for your response Anonymous. I appreciate it. My requirements want the user to be able to select the value in the table itself, not a slicer. I want to use the table as a slicer. Using your email screenshot, I would modify the left table to include multiple "event_name" rows with the same value and different dates (so more than 1 event_name "event01" for example). A user would select "1/13/2023, event01" from the left table, and then the second table on the right would show ALL of the "event01" rows and NOT not filter the "actual date" from the left table record. That is, show all the values where event_expanded_view[event_name] = selected_event_name ("event01" in the left table) but NOT filter the date. I appreciate your thoughts on how best to accomplish this if possible.