<?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 Selection from Slicer as column in virtual table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selection-from-Slicer-as-column-in-virtual-table/m-p/1005457#M12795</link>
    <description>&lt;P&gt;Hi all. I'm trying my best to describe the issue I have...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to create a virtual table which includes one column that shows the selection from a slicer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Slicer:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a slicer to select Business Unit. I also have a measure which gives me the selected item from the slicer with SELECTEDVALUE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;physical Table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table with data from different Business Units&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;virtual table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a virtual table which is based on the physical table from above but I add a couple of columns with ADDCOLUMNS. So far all good.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since I need the virtual table to be filtered to only the Business unit which is selected in the slicer, I was trying to add the result of the SELECTEDVALUE measure from above to a new column but this doesn't work. It stays blank. The formulare for the virtual table looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking for a way to replace the hardcoded "Business Unit XY" wich what is selected in the slicer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HL Virtual =&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR newTable =&lt;/P&gt;&lt;P&gt;ADDCOLUMNS(HL_Template;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;"RATETYPE";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOOKUPVALUE('Data'[RATETYPE];'Data'[MG_ACCOUNT ID];HL_Template[MG_ACCOUNT]);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp; "Selected Unit";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#FF0000"&gt;"Business Unit XY"&lt;/FONT&gt;)&lt;/P&gt;&lt;P&gt;VAR filteredtable =&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECTCOLUMNS(newTable;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "MG_ACCOUNT";HL_Template[MG_ACCOUNT];"Unit";HL_Template[Unit];"RATETYPE";[RATETYPE];"Selected Unit";[Selected Unit];"Unit = selected Unit";IF(HL_Template[Unit]=[Selected Unit];"YES";"NO"))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;FILTER(filteredtable;[Unit = selected Unit]="YES")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm happy for any hints in the right direction. Thanks guys!&lt;/P&gt;</description>
    <pubDate>Thu, 02 Apr 2020 18:42:34 GMT</pubDate>
    <dc:creator>Pascal_KTeam</dc:creator>
    <dc:date>2020-04-02T18:42:34Z</dc:date>
    <item>
      <title>Selection from Slicer as column in virtual table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selection-from-Slicer-as-column-in-virtual-table/m-p/1005457#M12795</link>
      <description>&lt;P&gt;Hi all. I'm trying my best to describe the issue I have...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to create a virtual table which includes one column that shows the selection from a slicer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Slicer:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a slicer to select Business Unit. I also have a measure which gives me the selected item from the slicer with SELECTEDVALUE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;physical Table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table with data from different Business Units&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;virtual table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a virtual table which is based on the physical table from above but I add a couple of columns with ADDCOLUMNS. So far all good.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since I need the virtual table to be filtered to only the Business unit which is selected in the slicer, I was trying to add the result of the SELECTEDVALUE measure from above to a new column but this doesn't work. It stays blank. The formulare for the virtual table looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking for a way to replace the hardcoded "Business Unit XY" wich what is selected in the slicer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HL Virtual =&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR newTable =&lt;/P&gt;&lt;P&gt;ADDCOLUMNS(HL_Template;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;"RATETYPE";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOOKUPVALUE('Data'[RATETYPE];'Data'[MG_ACCOUNT ID];HL_Template[MG_ACCOUNT]);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp; "Selected Unit";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#FF0000"&gt;"Business Unit XY"&lt;/FONT&gt;)&lt;/P&gt;&lt;P&gt;VAR filteredtable =&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECTCOLUMNS(newTable;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "MG_ACCOUNT";HL_Template[MG_ACCOUNT];"Unit";HL_Template[Unit];"RATETYPE";[RATETYPE];"Selected Unit";[Selected Unit];"Unit = selected Unit";IF(HL_Template[Unit]=[Selected Unit];"YES";"NO"))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;FILTER(filteredtable;[Unit = selected Unit]="YES")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm happy for any hints in the right direction. Thanks guys!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 18:42:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selection-from-Slicer-as-column-in-virtual-table/m-p/1005457#M12795</guid>
      <dc:creator>Pascal_KTeam</dc:creator>
      <dc:date>2020-04-02T18:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Selection from Slicer as column in virtual table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selection-from-Slicer-as-column-in-virtual-table/m-p/1005627#M12806</link>
      <description>&lt;P&gt;Sample data would be great.&amp;nbsp;Please see this post regarding How to Get Your Question Answered Quickly: &lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 21:00:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selection-from-Slicer-as-column-in-virtual-table/m-p/1005627#M12806</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-04-02T21:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: Selection from Slicer as column in virtual table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selection-from-Slicer-as-column-in-virtual-table/m-p/1006105#M12813</link>
      <description>&lt;P&gt;Basically I start with 2 tables (linked Excel file might make it even clearer, at least I hope so: &lt;A title="Excel File with details" href="https://kteamch.sharepoint.com/:x:/s/KTeamPUBLIC/EXuED7mzKBBPqL1-x3kio5sBqYg-ueDbI1xKOdeL0N4SWA?e=jh5kEr" target="_blank" rel="noopener"&gt;Excel File with details&lt;/A&gt;&amp;nbsp;)&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Table name:&lt;/TD&gt;&lt;TD&gt;Data&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;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&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Table name:&lt;/TD&gt;&lt;TD&gt;HL Template&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Wha'ts in there:&lt;/TD&gt;&lt;TD&gt;template which shows the accounts that should be shown in the report. Note that for unit1 we don't want to see acc002 and therefore haven't listed it in the template.&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Source&lt;/TD&gt;&lt;TD&gt;Source: manually created Excel file&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Business Unit&lt;/TD&gt;&lt;TD&gt;Account&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;unit1&lt;/TD&gt;&lt;TD&gt;acc001&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;unit2&lt;/TD&gt;&lt;TD&gt;acc003&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;unit2&lt;/TD&gt;&lt;TD&gt;acc004&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I create a 3rd table "Calc Table" using DAX. Basically I take table HL Template and add some columns from the Data table. This works fine. What I also need in the "Calc Table" is a column which shows which Business Unit is currently selected in a slicer which is linked to the Data table. So the red marked part of the DAX needs to be replaced&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calc Table =&lt;/P&gt;&lt;P&gt;VAR newTable =&lt;BR /&gt;ADDCOLUMNS(HL_Template;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;"RATETYPE";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOOKUPVALUE('Data'[RATETYPE];'Data'[ACCOUNT];HL_Template[ACCOUNT]);&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; "Selected Unit";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"&lt;FONT color="#FF0000"&gt;Business Unit XY&lt;/FONT&gt;")&lt;BR /&gt;VAR filteredtable =&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECTCOLUMNS(newTable;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "ACCOUNT";HL_Template[ACCOUNT];"Business Unit";HL_Template[Business Unit];"RATETYPE";[RATETYPE];"Selected Unit";[Selected Unit];"Unit = selected Unit";IF(HL_Template[Unit]=[Selected Unit];"YES";"NO"))&lt;/P&gt;&lt;P&gt;RETURN&lt;BR /&gt;FILTER(filteredtable;[Unit = selected Unit]="YES")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2020 05:54:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selection-from-Slicer-as-column-in-virtual-table/m-p/1006105#M12813</guid>
      <dc:creator>Pascal_KTeam</dc:creator>
      <dc:date>2020-04-03T05:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: Selection from Slicer as column in virtual table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selection-from-Slicer-as-column-in-virtual-table/m-p/1016992#M13092</link>
      <description>&lt;P&gt;I had to rethink the whole topic and now successfully created a measure which is doing what I need.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course, calculated columns are calculated on refresh so this wasn't actually an option&lt;/P&gt;</description>
      <pubDate>Thu, 09 Apr 2020 07:30:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selection-from-Slicer-as-column-in-virtual-table/m-p/1016992#M13092</guid>
      <dc:creator>Pascal_KTeam</dc:creator>
      <dc:date>2020-04-09T07:30:52Z</dc:date>
    </item>
  </channel>
</rss>

