<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: List values from other table based on the filter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/List-values-from-other-table-based-on-the-filter/m-p/3415976#M129239</link>
    <description>&lt;P&gt;create a measure like below.&lt;BR /&gt;# selected datasets = CALCULATE(COUNTROWS(REPORTS),TREATAS(VALUES(DATASETS[ID]),REPORTS[DATASET_ID]))&lt;BR /&gt;&lt;BR /&gt;use the measure in a filter on the visual where you're showing the reports. use not blank, or larger than zero.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Sep 2023 15:08:50 GMT</pubDate>
    <dc:creator>sjoerdvn</dc:creator>
    <dc:date>2023-09-05T15:08:50Z</dc:date>
    <item>
      <title>List values from other table based on the filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/List-values-from-other-table-based-on-the-filter/m-p/3415393#M129208</link>
      <description>&lt;P&gt;Hi all, I'm getting a bit desperate but perhaps I just don't understand how the DAX properly works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;assume the inputs:&lt;BR /&gt;&lt;BR /&gt;DATASETS table:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;NAME&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ID_1&lt;/TD&gt;&lt;TD&gt;DS_1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ID_2&lt;/TD&gt;&lt;TD&gt;DS_2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;REPORTS table:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;REPORT_ID&lt;/TD&gt;&lt;TD&gt;REPORT_NAME&lt;/TD&gt;&lt;TD&gt;DATASET_ID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;RP_1&lt;/TD&gt;&lt;TD&gt;REPORT_1&lt;/TD&gt;&lt;TD&gt;ID_1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;RP_2&lt;/TD&gt;&lt;TD&gt;REPORT_2&lt;/TD&gt;&lt;TD&gt;ID_1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;RP_3&lt;/TD&gt;&lt;TD&gt;REPORT_3&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;ID_2&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, I have a drill through page containing all the details per SINGLE Dataset Id. I want to have a table visual, that will display the "related" report as rows as a filter of that table.&lt;BR /&gt;E.g. if the datasets is DS_1&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;DS_ID&lt;/TD&gt;&lt;TD&gt;REPORT_NAME&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DS_1&lt;/TD&gt;&lt;TD&gt;REPORT_1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DS_1&lt;/TD&gt;&lt;TD&gt;REPORT_2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can get the COUNT that's not a problem. However I'm struggling with visualising a LIST, or a measure that returns a LIST or a TABLE if you know what I mean.&lt;BR /&gt;&lt;BR /&gt;The tables are not linked with any relationship in the model becuase of the really rich set if tables and relationships that already prevent it. It has to use some kind of TREATAS or FILTER&lt;BR /&gt;&lt;BR /&gt;Your help is much appreciated&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 10:17:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/List-values-from-other-table-based-on-the-filter/m-p/3415393#M129208</guid>
      <dc:creator>pacifist</dc:creator>
      <dc:date>2023-09-05T10:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: List values from other table based on the filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/List-values-from-other-table-based-on-the-filter/m-p/3415976#M129239</link>
      <description>&lt;P&gt;create a measure like below.&lt;BR /&gt;# selected datasets = CALCULATE(COUNTROWS(REPORTS),TREATAS(VALUES(DATASETS[ID]),REPORTS[DATASET_ID]))&lt;BR /&gt;&lt;BR /&gt;use the measure in a filter on the visual where you're showing the reports. use not blank, or larger than zero.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 15:08:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/List-values-from-other-table-based-on-the-filter/m-p/3415976#M129239</guid>
      <dc:creator>sjoerdvn</dc:creator>
      <dc:date>2023-09-05T15:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: List values from other table based on the filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/List-values-from-other-table-based-on-the-filter/m-p/3416116#M129242</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="392539" data-lia-user-login="pacifist" class="lia-mention lia-mention-user"&gt;pacifist&lt;/a&gt;&amp;nbsp;, here is a simple way:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;measure_ =
CALCULATE (
    COUNTROWS ( reports ),
    reports[DATASET_ID] = SELECTEDVALUE ( dataset[ID] )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 05 Sep 2023 16:10:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/List-values-from-other-table-based-on-the-filter/m-p/3416116#M129242</guid>
      <dc:creator>ERD</dc:creator>
      <dc:date>2023-09-05T16:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: List values from other table based on the filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/List-values-from-other-table-based-on-the-filter/m-p/3416533#M129286</link>
      <description>&lt;P&gt;Thank you for responding, however I was missing the last puzzle that was actually adding this measure to the visual filter as per the other response's suggestion!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 21:48:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/List-values-from-other-table-based-on-the-filter/m-p/3416533#M129286</guid>
      <dc:creator>pacifist</dc:creator>
      <dc:date>2023-09-05T21:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: List values from other table based on the filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/List-values-from-other-table-based-on-the-filter/m-p/3416534#M129287</link>
      <description>&lt;P&gt;You are a legend! This appears to be working, will have to do more testing! Honeslty, I'm unable to translate it into the human language on how the Visual filters the correct values on a measure that returns a number?! How is it linked?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 21:49:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/List-values-from-other-table-based-on-the-filter/m-p/3416534#M129287</guid>
      <dc:creator>pacifist</dc:creator>
      <dc:date>2023-09-05T21:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: List values from other table based on the filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/List-values-from-other-table-based-on-the-filter/m-p/3416585#M129293</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226664" data-lia-user-login="sjoerdvn" class="lia-mention lia-mention-user"&gt;sjoerdvn&lt;/a&gt;&amp;nbsp;now I have this interesting situation (see screenshot). The calculation gives me correct count, howeve the visual for Reports is not listing all 3 of them (there is another report in another workspace), as it's also filtered by the relationship between the Workspace in the model (the dataset is in relationship with workspaces too).&lt;BR /&gt;&lt;BR /&gt;How can I achieve completely ignoring the relationship between REPORTS - WORKSPACES for this particular visual while still filtering on the DSN_ID?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I don't include any column from Workspaces (e.g. ID, Name), then it lists it out properly:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Now I wonder how to resolve the above. Thank you upfront!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2023 22:56:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/List-values-from-other-table-based-on-the-filter/m-p/3416585#M129293</guid>
      <dc:creator>pacifist</dc:creator>
      <dc:date>2023-09-05T22:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: List values from other table based on the filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/List-values-from-other-table-based-on-the-filter/m-p/3419969#M129452</link>
      <description>&lt;P&gt;Since you haven't shared all the relevant tables and relationships, have to make some assumptions here. So I assume there is a table workspaces that has a relationship with both datasets and reports. This would be the reason why you can't create an active relationship between report and dataset. So now there is a slicer or page filter on workspaces that filters the datasets, but it will also filter out the reports for those datasets if the reports are in another workspace.&lt;BR /&gt;Multiple options here, but one way is to not use any workspace columns in the visual and create measures to do a lookup of the values based on the current report.&amp;nbsp;&lt;BR /&gt;So that could look like this:&lt;BR /&gt;report workspace name = CALCULATE(LOOKUPVALUE(WORKSPACES[WS_NAME],WORKSPACES[WS_ID],FIRSTNONBLANK(REPORTS[WS_ID],1)),ALL(WORKSPACES))&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 15:31:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/List-values-from-other-table-based-on-the-filter/m-p/3419969#M129452</guid>
      <dc:creator>sjoerdvn</dc:creator>
      <dc:date>2023-09-07T15:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: List values from other table based on the filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/List-values-from-other-table-based-on-the-filter/m-p/3423172#M129625</link>
      <description>&lt;P&gt;that again was teh TOP tip, thank you very much. It does look a bit unintuitive as I thought it would be easy to pull the related data directly from related table (Workspace Name) however haven't thought of having to create a lookup to bypass the filter.&lt;BR /&gt;&lt;BR /&gt;I'd better skill up in DAX as I have so many questions especially on pulling the data from other related tables.&lt;/P&gt;</description>
      <pubDate>Sun, 10 Sep 2023 21:51:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/List-values-from-other-table-based-on-the-filter/m-p/3423172#M129625</guid>
      <dc:creator>pacifist</dc:creator>
      <dc:date>2023-09-10T21:51:58Z</dc:date>
    </item>
  </channel>
</rss>

