<?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: Returning the selected value of a table for all rows of that visual in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Returning-the-selected-value-of-a-table-for-all-rows-of-that/m-p/3691731#M143466</link>
    <description>&lt;P&gt;That's a really interesting solution, thank you Barritown&lt;BR /&gt;&lt;BR /&gt;I was hoping to be able to get the selected value of a table visual within that same visual, but it seems it's not possible.&lt;BR /&gt;&lt;BR /&gt;Your solution however has inspired an alternative approach to the problem I was trying to solve though, so your help is very much appreciated.&lt;/P&gt;</description>
    <pubDate>Fri, 09 Feb 2024 19:05:13 GMT</pubDate>
    <dc:creator>gradient</dc:creator>
    <dc:date>2024-02-09T19:05:13Z</dc:date>
    <item>
      <title>Returning the selected value of a table for all rows of that visual</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Returning-the-selected-value-of-a-table-for-all-rows-of-that/m-p/3688119#M143283</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;I'm finding this particular issue far more challenging than expected and have thus far failed to figure out a solution to what I thought was a relatively simple problem&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table that has an id and a name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I display this is a table visual and wish to create a measure that will display the selected rows id on every row of the visual&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Selected ID&lt;BR /&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp; Bob&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;BR /&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp; Larry&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;BR /&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp; Steve&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In the above example the user has clicked on rwo 2 in the table and so the selected ID produced by a dax measure should return the id of that row for every row&lt;BR /&gt;&lt;BR /&gt;But it's not so simple. Using SELECTEDVALUE does not return the selected row and instead only returns the id of each row so i just end up with the rows own row ID rather that that of the selected row.&lt;BR /&gt;&lt;BR /&gt;Can anyone shed any light on how I can achieve the above, or whether it's simply not possible?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 11:07:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Returning-the-selected-value-of-a-table-for-all-rows-of-that/m-p/3688119#M143283</guid>
      <dc:creator>gradient</dc:creator>
      <dc:date>2024-02-08T11:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Returning the selected value of a table for all rows of that visual</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Returning-the-selected-value-of-a-table-for-all-rows-of-that/m-p/3689608#M143366</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="687386" data-lia-user-login="gradient" class="lia-mention lia-mention-user"&gt;gradient&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Normally, it shouldn't be possible because if you add two similar tables with ID and Name and select some name on one of them you will see that the second table contains only selected entry. So the "greyed out" entries in the first table are invisible.&lt;/P&gt;
&lt;P&gt;But here is the way to fake this behaviour (applicable if the number of rows is small enough so you can fit them into one visual without scrolling panes).&lt;/P&gt;
&lt;P&gt;You create a full copy of your original table and add two table visuals connected to the different tables to your dashboard.&lt;/P&gt;
&lt;P&gt;Then you create such a measure in the second table and add it to the visual connected to the second table:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = IF ( ISFILTERED ( 'Table'[Name] ), MAX ( 'Table'[ID] ), BLANK ( ) )&lt;/LI-CODE&gt;
&lt;P&gt;And two more measures to fake the color scheme (you apply them in the Cell Elements section of the visual for the column with the measure above):&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Conditional Color Font = 
VAR primaryCondition = ISFILTERED ( 'Table'[Name] )
VAR currentID = MAX ( 'Table 2'[ID] )
RETURN IF ( primaryCondition &amp;amp;&amp;amp; currentID &amp;lt;&amp;gt; [Measure], "#676665", "black")

Conditional Color Background = 
VAR primaryCondition = ISFILTERED ( 'Table'[Name] )
VAR currentID = MAX ( 'Table 2'[ID] )
RETURN IF ( primaryCondition &amp;amp;&amp;amp; currentID &amp;lt;&amp;gt; [Measure], "white", "#E5E5E5" )&lt;/LI-CODE&gt;
&lt;P&gt;Then you place the visual connected to the original table (don't forget to make the background transparent) on top of this visual and enjoy the result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I also attach the PBIX file for convenience.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Best Regards, &lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Alexander&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;&lt;A href="https://youtube.com/@powerbi-vlog" target="_blank"&gt;My YouTube vlog in English&lt;/A&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;&lt;A href="https://youtube.com/@pbi-vlog" target="_blank"&gt;My YouTube vlog in Russian&lt;/A&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 00:03:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Returning-the-selected-value-of-a-table-for-all-rows-of-that/m-p/3689608#M143366</guid>
      <dc:creator>barritown</dc:creator>
      <dc:date>2024-02-09T00:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: Returning the selected value of a table for all rows of that visual</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Returning-the-selected-value-of-a-table-for-all-rows-of-that/m-p/3691731#M143466</link>
      <description>&lt;P&gt;That's a really interesting solution, thank you Barritown&lt;BR /&gt;&lt;BR /&gt;I was hoping to be able to get the selected value of a table visual within that same visual, but it seems it's not possible.&lt;BR /&gt;&lt;BR /&gt;Your solution however has inspired an alternative approach to the problem I was trying to solve though, so your help is very much appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 19:05:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Returning-the-selected-value-of-a-table-for-all-rows-of-that/m-p/3691731#M143466</guid>
      <dc:creator>gradient</dc:creator>
      <dc:date>2024-02-09T19:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: Returning the selected value of a table for all rows of that visual</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Returning-the-selected-value-of-a-table-for-all-rows-of-that/m-p/3692345#M143508</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="687386" data-lia-user-login="gradient" class="lia-mention lia-mention-user"&gt;gradient&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;make a new table of id column&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;new table =
all(tablename[ID])&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;and don't connect it with your data model&lt;BR /&gt;make a new measure&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;selected id = 
SELECTEDVALUE('id only'[id])&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;make table visual&lt;/P&gt;&lt;P&gt;drag your id,name column from your old table and put measure&lt;/P&gt;&lt;P&gt;it look like below&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2024 14:19:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Returning-the-selected-value-of-a-table-for-all-rows-of-that/m-p/3692345#M143508</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2024-02-10T14:19:37Z</dc:date>
    </item>
  </channel>
</rss>

